Skip to content

Commit

Permalink
Use correct regex syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Feb 21, 2024
1 parent f64222b commit 606a3d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/packagedcode/gemfile_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ def get_option(s):
'%(NAME_VERSION)s'
'$' % locals()).match

PLATS = re.compile('^ (?P<platform>.*)$').match
BUNDLED_WITH = re.compile('^\s+(?P<version>(?:\d+.)+\d+)\s*$').match
PLATS = re.compile(r'^ (?P<platform>.*)$').match
BUNDLED_WITH = re.compile(r'^\s+(?P<version>(?:\d+.)+\d+)\s*$').match


class GemfileLockParser:
Expand Down
4 changes: 2 additions & 2 deletions src/textcode/strings2.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import re

ASCII_BYTE = (
" !\"#\$%&\'\(\)\*\+,-\./0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"\[\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}\\\~\t"
r" !\"#\$%&\'\(\)\*\+,-\./0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"
r"\[\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}\\\~\t"
)


Expand Down

0 comments on commit 606a3d0

Please sign in to comment.