From e8dd9bbccc9159d2ccf406c7826d5f6dd1beb8bd Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Mon, 18 Nov 2024 10:31:06 +0100 Subject: [PATCH] (fix): string business --- ci/scripts/towncrier_automation.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/scripts/towncrier_automation.py b/ci/scripts/towncrier_automation.py index e367ebbac..5e3e8942d 100755 --- a/ci/scripts/towncrier_automation.py +++ b/ci/scripts/towncrier_automation.py @@ -75,12 +75,16 @@ def main(argv: Sequence[str] | None = None) -> None: if Version(args.version).micro != 0 and not re.fullmatch( patch_branch_pattern, base_branch ): - msg = f"Version {args.version} is a patch release, but " - "you are trying to release from a non-patch release branch: {base_branch}." + msg = ( + f"Version {args.version} is a patch release, but " + f"you are trying to release from a non-patch release branch: {base_branch}." + ) raise NoPatchReleaseOnMainError(msg) if Version(args.version).micro == 0 and base_branch != "main": - msg = f"Version {args.version} is a minor or major release, " - "but you are trying to release not from main: {base_branch}." + msg = ( + f"Version {args.version} is a minor or major release, " + f"but you are trying to release not from main: {base_branch}." + ) raise NoMinorMajorReleaseOffMainError(msg) pr_description = "" if base_branch == "main" else "@meeseeksdev backport to main" branch_name = f"release_notes_{args.version}"