mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Correct some regex SyntaxWarnings
This commit is contained in:
@@ -299,7 +299,7 @@ def collect_file_tests(path, lines, lines_to_execute):
|
|||||||
skip_version_info = None
|
skip_version_info = None
|
||||||
for line_nr, line in enumerate(lines, 1):
|
for line_nr, line in enumerate(lines, 1):
|
||||||
if correct is not None:
|
if correct is not None:
|
||||||
r = re.match('^(\d+)\s*(.*)$', correct)
|
r = re.match(r'^(\d+)\s*(.*)$', correct)
|
||||||
if r:
|
if r:
|
||||||
column = int(r.group(1))
|
column = int(r.group(1))
|
||||||
correct = r.group(2)
|
correct = r.group(2)
|
||||||
@@ -402,7 +402,7 @@ if __name__ == '__main__':
|
|||||||
test_files = {}
|
test_files = {}
|
||||||
last = None
|
last = None
|
||||||
for arg in arguments['<rest>']:
|
for arg in arguments['<rest>']:
|
||||||
match = re.match('(\d+)-(\d+)', arg)
|
match = re.match(r'(\d+)-(\d+)', arg)
|
||||||
if match:
|
if match:
|
||||||
start, end = match.groups()
|
start, end = match.groups()
|
||||||
test_files[last].append((int(start), int(end)))
|
test_files[last].append((int(start), int(end)))
|
||||||
|
|||||||
Reference in New Issue
Block a user