Use cls in DiagnosticLine.try_from_string

This commit is contained in:
Zanie
2023-10-27 12:23:04 -05:00
parent 8441db69ae
commit c4bddb88c9

View File

@@ -373,7 +373,7 @@ class DiagnosticLine:
match_items = match.groupdict()
return DiagnosticLine(
return cls(
location=match_items["location"],
is_removed=match_items.get("diff") == "-",
is_added=match_items.get("diff") == "+",