Skip to content

Commit

Permalink
fix(build): fix Python warning
Browse files Browse the repository at this point in the history
f"\S" is interpreted as f"\\S", but a warning is issued by Python:

    tools/collect-copyright:837: SyntaxWarning: invalid escape sequence '\S'
      match = re.match(f"^(?P<package>\S+): (?P<file>.*)$", line)

Fix this warning by writing f"\\S" explicitly.
  • Loading branch information
strager committed Aug 18, 2024
1 parent ac3e925 commit f0fed07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/collect-copyright
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ class Debian:

packages = []
for line in process.stdout.splitlines():
match = re.match(f"^(?P<package>\S+): (?P<file>.*)$", line)
match = re.match(f"^(?P<package>\\S+): (?P<file>.*)$", line)
if match is not None:
file = match.group("file")
package_name = match.group("package")
Expand Down

0 comments on commit f0fed07

Please sign in to comment.