File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ class TemporaryDirectory(Protocol):
4949class Mypy (PythonLinter ):
5050 """Provides an interface to mypy."""
5151
52- regex = r'^(\w:)?[^:]+:(?P<line>\d+):((?P<col>\d+):)?\s*(?P<error_type>[^:]+):\s*(?P<message>.+)'
52+ regex = (
53+ r'^(?P<filename>.+?):(?P<line>\d+):((?P<col>\d+):)?\s*'
54+ r'(?P<error_type>[^:]+):\s*(?P<message>.+?)(\s\s\[(?P<code>.+)\])?$'
55+ )
5356 line_col_base = (1 , 1 )
5457 tempfile_suffix = 'py'
5558 default_type = const .WARNING
@@ -63,6 +66,7 @@ class Mypy(PythonLinter):
6366 "--cache-dir:" : "" ,
6467 # Allow users to disable this
6568 "--incremental" : True ,
69+ "--show-error-codes" : True ,
6670 # Need this to silent lints for other files. Alternatively: 'skip'
6771 "--follow-imports:" : "silent" ,
6872 }
You can’t perform that action at this time.
0 commit comments