mirror of https://github.com/astral-sh/ruff
Use `cls` in `DiagnosticLine.try_from_string`
This commit is contained in:
parent
8441db69ae
commit
c4bddb88c9
|
|
@ -373,7 +373,7 @@ class DiagnosticLine:
|
||||||
|
|
||||||
match_items = match.groupdict()
|
match_items = match.groupdict()
|
||||||
|
|
||||||
return DiagnosticLine(
|
return cls(
|
||||||
location=match_items["location"],
|
location=match_items["location"],
|
||||||
is_removed=match_items.get("diff") == "-",
|
is_removed=match_items.get("diff") == "-",
|
||||||
is_added=match_items.get("diff") == "+",
|
is_added=match_items.get("diff") == "+",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue