MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / dedupe

Function dedupe

vulnerabilities/utils.py:299–305  ·  view source on GitHub ↗

Remove all duplicate items and return a new list preserving ordering >>> dedupe(["z","i","a","a","d","d"]) ['z', 'i', 'a', 'd']

(original: List)

Source from the content-addressed store, hash-verified

297
298
299def dedupe(original: List) -> List:
300 """
301 Remove all duplicate items and return a new list preserving ordering
302 >>> dedupe(["z","i","a","a","d","d"])
303 ['z', 'i', 'a', 'd']
304 """
305 return list(dict.fromkeys(original))
306
307
308def get_affected_packages_by_patched_package(

Callers 9

process_responseFunction · 0.90
parse_advisory_dataFunction · 0.90
parseMethod · 0.90
get_aliasesFunction · 0.90
parseMethod · 0.90
parse_advisory_dataFunction · 0.90
get_fixed_versionsFunction · 0.90
parse_advisory_dataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected