Skip to content

Commit

Permalink
SyntaxWarning when running 'git-webkit pr'
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260729

Reviewed by Jonathan Bedard.

The backslashes here are python string escapes, but they were intended
to be regex escapes. Each \ would need to be replaced with \\ for them
to function as regex escapes. We can use raw string notation to avoid
this problem.

* Tools/Scripts/webkitpy/common/checkout/checkout.py:
(Checkout):

Canonical link: https://commits.webkit.org/267558@main
  • Loading branch information
mcatanzaro committed Sep 1, 2023
1 parent 27a5832 commit ade70bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/Scripts/webkitpy/common/checkout/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
# FIXME: Move a bunch of ChangeLog-specific processing from SCM to this object.
# NOTE: All paths returned from this class should be absolute.
class Checkout(object):
COMMIT_SUBJECT_RE = re.compile(b'Subject: \[PATCH ?(\d+\/\d+)?] (.+)')
FILTER_BRANCH_PROGRAM = '''import re
COMMIT_SUBJECT_RE = re.compile(br'Subject: \[PATCH ?(\d+\/\d+)?] (.+)')
FILTER_BRANCH_PROGRAM = r'''import re
import sys
lines = [l for l in sys.stdin]
Expand Down

0 comments on commit ade70bd

Please sign in to comment.