summaryrefslogtreecommitdiff
path: root/tools/c_coverage
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-02-25 07:29:45 -0700
committerCharles Harris <charlesr.harris@gmail.com>2017-02-25 07:50:15 -0700
commite5110fa81540103800da34c2199a0e2823031f98 (patch)
tree4a2f6a7e44067148251d3348099dd76c3d4664ae /tools/c_coverage
parente9246860480b6c909e6e00c1cd4371b0e5fee1ce (diff)
downloadnumpy-e5110fa81540103800da34c2199a0e2823031f98.tar.gz
MAINT: Fix deprecated escape sequences in tools/
Fix the escape sequences deprecated in Python 3.6 found in the tools directory. Note that this does not include the files in tools/swig/tests which are not even Python 3 compatible at this point.
Diffstat (limited to 'tools/c_coverage')
-rwxr-xr-xtools/c_coverage/c_coverage_report.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/c_coverage/c_coverage_report.py b/tools/c_coverage/c_coverage_report.py
index d9eb49739..327f6dc05 100755
--- a/tools/c_coverage/c_coverage_report.py
+++ b/tools/c_coverage/c_coverage_report.py
@@ -94,7 +94,7 @@ class SourceFiles:
def clean_path(self, path):
path = path[len(self.prefix):]
- return re.sub("[^A-Za-z0-9\.]", '_', path)
+ return re.sub(r"[^A-Za-z0-9\.]", '_', path)
def write_text(self, root):
for path, source in self.files.items():
@@ -121,8 +121,8 @@ class SourceFiles:
def collect_stats(files, fd, pattern):
# TODO: Handle compressed callgrind files
line_regexs = [
- re.compile("(?P<lineno>[0-9]+)(\s[0-9]+)+"),
- re.compile("((jump)|(jcnd))=([0-9]+)\s(?P<lineno>[0-9]+)")
+ re.compile(r"(?P<lineno>[0-9]+)(\s[0-9]+)+"),
+ re.compile(r"((jump)|(jcnd))=([0-9]+)\s(?P<lineno>[0-9]+)")
]
current_file = None