Skip to content

Commit 2fcff39

Browse files
committed
Fix type errors
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 6b61e7e commit 2fcff39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vulnerabilities/importer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def to_dict(self):
7272
def __lt__(self, other):
7373
if not isinstance(other, VulnerabilitySeverity):
7474
return NotImplemented
75-
return self._cmp_key() < other._cmp_key()
75+
return str(self._cmp_key()) < str(other._cmp_key())
7676

7777
# TODO: Add cache
7878
def _cmp_key(self):
@@ -107,7 +107,7 @@ def __post_init__(self):
107107
def __lt__(self, other):
108108
if not isinstance(other, Reference):
109109
return NotImplemented
110-
return self._cmp_key() < other._cmp_key()
110+
return str(self._cmp_key()) < str(other._cmp_key())
111111

112112
# TODO: Add cache
113113
def _cmp_key(self):
@@ -189,7 +189,7 @@ def get_fixed_purl(self):
189189
def __lt__(self, other):
190190
if not isinstance(other, AffectedPackage):
191191
return NotImplemented
192-
return self._cmp_key() < other._cmp_key()
192+
return str(self._cmp_key()) < str(other._cmp_key())
193193

194194
# TODO: Add cache
195195
def _cmp_key(self):

0 commit comments

Comments
 (0)