Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
item.py
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file item.py
1 from dataclasses import dataclass
2 from pathlib import Path
3 from typing import List
4 
5 import pydantic
6 
7 
8 class Item(pydantic.BaseModel):
9  path: Path
10  line: int
11  col: int
12  message: str
13  code: str
14  severity: str
15 
16  def __hash__(self):
17  return hash((self.path, self.line, self.col, self.code))
18 
19  def __eq__(self, other):
20  return (self.path, self.line, self.col, self.code) == (
21  other.path,
22  other.line,
23  other.col,
24  other.code,
25  )
26 
27 
28 class ItemCollection(pydantic.BaseModel):
29  __root__: List[Item]