Skip to content

Commit 606a3d0

Browse files
committed
Use correct regex syntax
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent f64222b commit 606a3d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/packagedcode/gemfile_lock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ def get_option(s):
340340
'%(NAME_VERSION)s'
341341
'$' % locals()).match
342342

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

346346

347347
class GemfileLockParser:

src/textcode/strings2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import re
2424

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

3030

0 commit comments

Comments
 (0)