Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a920800

Browse files
committed
Correctly parse file paths on Windows
The old regex couldn't handle drive letters and the following colon. Fixes #46.
1 parent ea44030 commit a920800

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

linter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
class Mypy(PythonLinter):
3535
"""Provides an interface to mypy."""
3636

37-
regex = r'^[^:]+:(?P<line>\d+):((?P<col>\d+):)?\s*(?P<error_type>[^:]+):\s*(?P<message>.+)'
37+
regex = r'^(\w:)?[^:]+:(?P<line>\d+):((?P<col>\d+):)?\s*(?P<error_type>[^:]+):\s*(?P<message>.+)'
3838
line_col_base = (1, 1)
3939
tempfile_suffix = 'py'
4040
default_type = const.WARNING

0 commit comments

Comments
 (0)