File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1509,12 +1509,15 @@ def python_3000_backticks(logical_line):
1509
1509
1510
1510
1511
1511
@register_check
1512
- def python_3000_invalid_escape_sequence (logical_line , tokens ):
1512
+ def python_3000_invalid_escape_sequence (logical_line , tokens , noqa ):
1513
1513
r"""Invalid escape sequences are deprecated in Python 3.6.
1514
1514
1515
1515
Okay: regex = r'\.png$'
1516
1516
W605: regex = '\.png$'
1517
1517
"""
1518
+ if noqa :
1519
+ return
1520
+
1518
1521
# https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
1519
1522
valid = [
1520
1523
'\n ' ,
Original file line number Diff line number Diff line change 40
40
\\.png$
41
41
'''
42
42
s = '\\ '
43
+ regex = '\w' # noqa
44
+ regex = '''
45
+ \w
46
+ ''' # noqa
43
47
#: W606
44
48
async = 42
45
49
#: W606
You can’t perform that action at this time.
0 commit comments