From d4934fdc9c427f0d3ba021179e57c48fc7c5a37b Mon Sep 17 00:00:00 2001 From: Heals Date: Wed, 15 Nov 2023 19:08:50 +0100 Subject: [PATCH] Fix flake8 complains --- pylsp_mypy/plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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}'")