[Python-modules-commits] [pep8-naming] 05/07: Use raw strings in regexps

Mattia Rizzolo mattia at debian.org
Sun Jan 28 11:11:29 UTC 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pep8-naming.

commit cb927a1deac7a4c40bac88c3ad6bd0dcc3953367
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date:   Sun Jan 28 12:06:19 2018 +0100

    Use raw strings in regexps
    
    To avoid DeprecationWarnings with Python 3.6.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 run_tests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index b3d1b93..ce97ff7 100644
--- a/run_tests.py
+++ b/run_tests.py
@@ -6,8 +6,8 @@ import re
 PyCF_ONLY_AST = 1024
 
 IS_PY3 = sys.version_info[0] == 3
-IS_PY3_TEST = re.compile("^#\s*python3\s*only")
-IS_PY2_TEST = re.compile("^#\s*python2\s*only")
+IS_PY3_TEST = re.compile(r"^#\s*python3\s*only")
+IS_PY2_TEST = re.compile(r"^#\s*python2\s*only")
 
 
 def main():

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pep8-naming.git



More information about the Python-modules-commits mailing list