File indexing completed on 2025-01-18 09:10:43
0001 from pathlib import Path
0002 from typing import List
0003
0004 import pydantic
0005
0006
0007 class Item(pydantic.BaseModel):
0008 path: Path
0009 line: int
0010 col: int
0011 message: str
0012 code: str
0013 severity: str
0014
0015 def __hash__(self):
0016 return hash((self.path, self.line, self.col, self.code))
0017
0018 def __eq__(self, other):
0019 return (self.path, self.line, self.col, self.code) == (
0020 other.path,
0021 other.line,
0022 other.col,
0023 other.code,
0024 )
0025
0026
0027 class ItemCollection(pydantic.RootModel[List[Item]]):
0028 pass