We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e0de4b + 78d8b45 commit 99a4eb8Copy full SHA for 99a4eb8
2 files changed
pycodestyle.py
@@ -1509,12 +1509,15 @@ def python_3000_backticks(logical_line):
1509
1510
1511
@register_check
1512
-def python_3000_invalid_escape_sequence(logical_line, tokens):
+def python_3000_invalid_escape_sequence(logical_line, tokens, noqa):
1513
r"""Invalid escape sequences are deprecated in Python 3.6.
1514
1515
Okay: regex = r'\.png$'
1516
W605: regex = '\.png$'
1517
"""
1518
+ if noqa:
1519
+ return
1520
+
1521
# https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
1522
valid = [
1523
'\n',
testsuite/W60.py
@@ -40,6 +40,10 @@
40
\\.png$
41
'''
42
s = '\\'
43
+regex = '\w' # noqa
44
+regex = '''
45
+\w
46
+''' # noqa
47
#: W606
48
async = 42
49
0 commit comments