Skip to content

Commit 5993037

Browse files
committed
Fix Python SyntaxWarning in two f-string literals.
Building on Ubuntu 24.04, multilib-generate.py provokes some SyntaxWarning messages from Python 3.12, because of cases where we'd written `\+` in a string, intended to be emitted literally. 3.12 still _does_ emit it literally, but prints a warning pointing out that we should properly escape the backslash, writing it as `\\+`.
1 parent 7bd8ccd commit 5993037

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multilib-generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ def generate_extensions(args):
247247
print("# original option to check that.")
248248

249249
for feature in all_features:
250-
print(f"- Match: -march=armv.*\\+{feature}($|\+.*)")
250+
print(f"- Match: -march=armv.*\\+{feature}($|\\+.*)")
251251
print(f" Flags:")
252252
print(f" - -march=armvX+{feature}")
253-
print(f"- Match: -march=armv.*\\+no{feature}($|\+.*)")
253+
print(f"- Match: -march=armv.*\\+no{feature}($|\\+.*)")
254254
print(f" Flags:")
255255
print(f" - -march=armvX+no{feature}")
256256
print()

0 commit comments

Comments
 (0)