summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2018-11-22 15:13:47 +0200
committerMarius Gedminas <marius@gedmin.as>2018-11-22 15:13:47 +0200
commitcb8402add912fa162a42eef9067c446704d919d3 (patch)
tree3c3ebee97b4885bf3bc0945905b66143b411c23c /testsuite
parentb49f5e75be2e942f264f75acc6a7713c593c5615 (diff)
downloadpep8-cb8402add912fa162a42eef9067c446704d919d3.tar.gz
Make W605 point to the invalid sequence
Instead of having W605 point to the beginning of the string literal, make it point to the precise line and column of the invalid escape sequence. This is more helpful when you have multiline string literals.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/W60.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/testsuite/W60.py b/testsuite/W60.py
index 1b03099..4cbaad9 100644
--- a/testsuite/W60.py
+++ b/testsuite/W60.py
@@ -13,16 +13,23 @@ if x <> 0:
x = 0
#: W604
val = `1 + 2`
-#: W605:1:9
+#: W605:1:10
regex = '\.png$'
-#: W605:1:9
+#: W605:2:1
regex = '''
\.png$
'''
-#: W605:2:5
+#: W605:2:6
f(
'\_'
)
+#: W605:4:6
+"""
+multi-line
+literal
+with \_ somewhere
+in the middle
+"""
#: Okay
regex = r'\.png$'
regex = '\\.png$'