Remove leftover code for pypi references

This commit is contained in:
Christoph Reiter 2025-02-25 08:47:24 +01:00
parent 2039923f25
commit 1bfc1927c8
2 changed files with 1 additions and 6 deletions

View File

@ -488,7 +488,7 @@ class Source:
"""If the package has the metadata required for vulnerabilities to be detected"""
references = self.pkgextra.references
# Roughly what our external scanner supports atm
return "pypi" in references or "purl" in references or "cpe" in references
return "purl" in references or "cpe" in references
@property
def repos(self) -> list[str]:

View File

@ -35,11 +35,6 @@ def extract_pypi_project_from_purl(purl: str) -> str | None:
def extract_pypi_project_from_references(references: dict[str, list[str | None]]) -> str | None:
if "pypi" in references:
for entry in references["pypi"]:
if entry is not None:
return entry
for purl in references.get("purl", []):
if purl is None:
continue