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

Function normalize_purl

vulnerabilities/utils.py:594–600  ·  view source on GitHub ↗

Return a normalized purl object from a purl string or purl object.

(purl: Union[PackageURL, str])

Source from the content-addressed store, hash-verified

592
593
594def normalize_purl(purl: Union[PackageURL, str]):
595 """
596 Return a normalized purl object from a purl string or purl object.
597 """
598 if isinstance(purl, PackageURL):
599 purl = str(purl)
600 return PackageURL.from_string(purl)
601
602
603def get_purl_version_class(purl):

Callers 4

saveMethod · 0.90
saveMethod · 0.90
update_purl_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected