mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-08 13:05:13 +08:00
Fix some stuff about backslashes.
This commit is contained in:
1 parent
7981a309d1
commit
005e5f403a
2 files changed
+29
-22
No files matched your search
@@ -15,12 +15,13 @@ def collect_errors(code):
|
||||
if match is not None:
|
||||
codes = match.group(2)
|
||||
for code in codes.split():
|
||||
column = len(match.group(1))
|
||||
if ':' in code:
|
||||
code, _, add_indent = code.partition(':')
|
||||
column = int(add_indent)
|
||||
code, _, add_indent = code.partition(':')
|
||||
column = int(add_indent or len(match.group(1)))
|
||||
|
||||
yield "%s@(%s,%s)" % (code[1:], line_nr + 1, column)
|
||||
code, _, add_line = code.partition('+')
|
||||
l = line_nr + 1 + int(add_line or 0)
|
||||
|
||||
yield "%s@(%s,%s)" % (code[1:], l, column)
|
||||
|
||||
|
||||
def test_normalizer_issue(normalizer_issue_file):
|
||||
|
||||
Reference in new issue
Block a user