Skip to content

Commit

Permalink
Fix flake8 complains
Browse files Browse the repository at this point in the history
  • Loading branch information
Heals authored and Richardk2n committed Nov 15, 2023
1 parent 930d5b5 commit d4934fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pylsp_mypy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<file>.+):(?P<start_line>\d+): "
r"(?P<severity>\w+): (?P<message>.+?)(?: +\[(?P<code>.+)\])?$"
Expand Down Expand Up @@ -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}'")
Expand Down

0 comments on commit d4934fd

Please sign in to comment.