File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ class ComparableDict(ComparableTuple):
6363 Allows comparison of dictionaries, allowing for missing/None values.
6464 """
6565
66- def __new__ (cls , d :dict ) -> 'ComparableDict' :
67- data = tuple (sorted (d .items ()))
68- return super (ComparableDict , cls ).__new__ (cls , data )
66+ def __new__ (cls , d : dict ) -> 'ComparableDict' :
67+ return super (ComparableDict , cls ).__new__ (cls , tuple (sorted (d .items ())))
6968
7069
7170class ComparablePackageURL (ComparableTuple ):
@@ -74,11 +73,10 @@ class ComparablePackageURL(ComparableTuple):
7473 """
7574
7675 def __new__ (cls , p : 'PackageURL' ) -> 'ComparablePackageURL' :
77- data = (
76+ return super ( ComparablePackageURL , cls ). __new__ ( cls , (
7877 p .type ,
7978 p .namespace ,
8079 p .version ,
8180 ComparableDict (p .qualifiers ) if isinstance (p .qualifiers , dict ) else p .qualifiers ,
8281 p .subpath
83- )
84- return super (ComparablePackageURL , cls ).__new__ (cls , data )
82+ ))
You can’t perform that action at this time.
0 commit comments