Skip to content

Commit

Permalink
Fix DeprecationWarning: invalid escape sequence \d
Browse files Browse the repository at this point in the history
  • Loading branch information
league committed May 29, 2024
1 parent b566729 commit 9706acd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
pass
run_scripts_tests &= (sys.version_info[0] >= 3)

_LINT_RE = re.compile('(?P<module>.*?)\:(?P<line>\d+)\: \[(?P<type>.*?)\] (?P<info>.*)')
_LINT_RE = re.compile(r'(?P<module>.*?)\:(?P<line>\d+)\: \[(?P<type>.*?)\] (?P<info>.*)')

@unittest.skipUnless(run_scripts_tests, "requires the 'pylint' module")
class ScriptTest(unittest.TestCase):
Expand Down
1 change: 0 additions & 1 deletion test/test_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import unittest
import glob
import sys
import re
import os
from tempfile import mkdtemp
from shutil import rmtree
Expand Down
2 changes: 1 addition & 1 deletion tools/like_pmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main(args):
raise RuntimeError("Cannot find NUMA memory info for PID: %i" % args.pid)

# Parse out the anonymous entries in this file
_numaRE = re.compile('(?P<addr>[0-9a-f]+).*[(anon)|(mapped)]=(?P<size>\d+).*(swapcache=(?P<swap>\d+))?.*N(?P<binding>\d+)=(?P<size2>\d+)')
_numaRE = re.compile(r'(?P<addr>[0-9a-f]+).*[(anon)|(mapped)]=(?P<size>\d+).*(swapcache=(?P<swap>\d+))?.*N(?P<binding>\d+)=(?P<size2>\d+)')
areas = {}
files = {}
for line in numaInfo.split('\n'):
Expand Down

0 comments on commit 9706acd

Please sign in to comment.