From 25050718c5fd56f7730d78c830ff622d2f30f819 Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Thu, 14 Nov 2024 11:04:04 +0100 Subject: [PATCH] (fix): `msg` format --- ci/scripts/towncrier_automation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/scripts/towncrier_automation.py b/ci/scripts/towncrier_automation.py index f04aae0ca..5cc24186d 100755 --- a/ci/scripts/towncrier_automation.py +++ b/ci/scripts/towncrier_automation.py @@ -75,13 +75,13 @@ def main(argv: Sequence[str] | None = None) -> None: if Version(args.version).micro != 0 and not re.fullmatch( patch_branch_pattern, base_branch ): - raise NoPatchReleaseOnMainError( - 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 " + "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": - raise NoMinorMajorReleaseOffMainError( - 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, " + "but you are trying to release not from main: {base_branch}." + raise NoMinorMajorReleaseOffMainError(msg) pr_description = ( "" if base_branch == "main" else "@meeseeksmachine backport to main" )