diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2017-02-24 11:27:57 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2017-02-25 10:21:05 +0200 |
commit | 110a5c3bcd4ac407a471410f23f82cb6e706e6bb (patch) | |
tree | 12e8112b9bbb57fa171ad9e2f8c2bb8ca93591dd | |
parent | ca5350195031c8e29c50292404eaec848bbb073b (diff) | |
download | pep8-110a5c3bcd4ac407a471410f23f82cb6e706e6bb.tar.gz |
Python 3.6 invalid escape sequence deprecation fix
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
"backslash-character pair that is not a valid escape sequence now
generates a DeprecationWarning. Although this will eventually become a
SyntaxError, that will not be for several Python releases."
-rwxr-xr-x | pycodestyle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 5d8c2ac..76fce9b 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -124,7 +124,7 @@ HUNK_REGEX = re.compile(r'^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$') STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)') STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def\s+|def\s+|class\s+|@)') STARTSWITH_INDENT_STATEMENT_REGEX = re.compile( - r'^\s*({0})'.format('|'.join(s.replace(' ', '\s+') for s in ( + r'^\s*({0})'.format('|'.join(s.replace(' ', r'\s+') for s in ( 'def', 'async def', 'for', 'async for', 'if', 'elif', 'else', |