Skip to content

Commit 110a5c3

Browse files
committed
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."
1 parent ca53501 commit 110a5c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pycodestyle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)')
125125
STARTSWITH_TOP_LEVEL_REGEX = re.compile(r'^(async\s+def\s+|def\s+|class\s+|@)')
126126
STARTSWITH_INDENT_STATEMENT_REGEX = re.compile(
127-
r'^\s*({0})'.format('|'.join(s.replace(' ', '\s+') for s in (
127+
r'^\s*({0})'.format('|'.join(s.replace(' ', r'\s+') for s in (
128128
'def', 'async def',
129129
'for', 'async for',
130130
'if', 'elif', 'else',

0 commit comments

Comments
 (0)