Fix unhashable type error
Checklist
-
documentation is changed or added in./docs
-
unit tests updated to test changes
Description
Context
Merging SBOMs was failing when using certain CycloneDX models missing a __hash__
method.
Intent
- Use
CycloneDXBaseModel
as super class forAffectVersion
model in order to inherit its__hash__
method - Add
__hash__
methods to various model classes - Update
hoppr.utils.dedup_list
function to accept and return a generic type bound totyping.Hashable
- This should help
mypy
raise errors if attempting to write code that callsdedup_list
with a list of objects that don't implement the__hash__
method
- This should help
Closes #302 (closed)