Skip to content

Commit

Permalink
drop Validator in favour of DataSource
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Aug 4, 2022
1 parent 922859f commit 7bc5575
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
# Visit https://github.com/nexB/vulnerablecode/ for support and download.


VALIDATORS_REGISTRY = []
DATASOURCE_REGISTRY = []

VALIDATORS_REGISTRY = {x.__module__.split(".")[-1]: x for x in VALIDATORS_REGISTRY}
DATASOURCE_REGISTRY = {x.__module__.split(".")[-1]: x for x in DATASOURCE_REGISTRY}
File renamed without changes.
11 changes: 6 additions & 5 deletions vulntotal/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ def to_dict(self):
}


class Validator:
_raw_dump = []
class DataSource:
def __init__(self):
self._raw_dump = []

def validator_advisory(self, purl) -> Iterable[VendorData]:
def datasource_advisory(self, purl) -> Iterable[VendorData]:
"""
Yield VendorData object corresponding to vendor
Yield VendorData object corresponding to DataSource
"""
return NotImplementedError

Expand All @@ -57,7 +58,7 @@ def support_ecosystem(cls):
"""
Return dictionary containing supported ecosystem
{
"PURL equivalent ecosystem" : "Validator ecosystem",
"PURL equivalent ecosystem" : "DataSource ecosystem",
}
"""
return NotImplementedError
Expand Down

0 comments on commit 7bc5575

Please sign in to comment.