We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74b6e22 commit 6c5157fCopy full SHA for 6c5157f
1 file changed
src/ort/models/package_reference.py
@@ -25,9 +25,19 @@ class PackageReference(BaseModel):
25
"also use that as the default value here to not blow up ORT result files.",
26
)
27
dependencies: set["PackageReference"] = Field(
28
+ default_factory=set,
29
description="The set of references to packages this package depends on. Note that this list depends on the "
30
"scope in which this package is referenced.",
31
32
issues: list[Issue] = Field(
33
+ default_factory=list,
34
description="A list of issues that occurred handling this PackageReference.",
35
36
+
37
+ def __hash__(self) -> int:
38
+ return hash(self.id)
39
40
+ def __eq__(self, other) -> bool:
41
+ if not isinstance(other, PackageReference):
42
+ return NotImplemented
43
+ return self.id == other.id
0 commit comments