diff --git a/pylsp_mypy/plugin.py b/pylsp_mypy/plugin.py index a0c9f74..a53e1f2 100644 --- a/pylsp_mypy/plugin.py +++ b/pylsp_mypy/plugin.py @@ -37,7 +37,7 @@ ) ) -whole_line_pattern = re.compile( # certain mypy warnings do not report start-end ranges +whole_line_pattern = re.compile( # certain mypy warnings do not report start-end ranges ( r"^(?P.+):(?P\d+): " r"(?P\w+): (?P.+?)(?: +\[(?P.+)\])?$" @@ -107,7 +107,6 @@ def parse_line(line: str, document: Optional[Document] = None) -> Optional[Dict[ end_lineno = int(result.groupdict().get("end_line", lineno + 1)) - 1 end_offset = int(result.groupdict().get("end_col", 1)) # end is exclusive - severity = result["severity"] if severity not in ("error", "note"): log.warning(f"invalid error severity '{severity}'")