Skip to content

Commit 78dd5ae

Browse files
committed
drop Validator in favour of DataSource
Signed-off-by: Keshav Priyadarshi <[email protected]>
1 parent 922859f commit 78dd5ae

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

vulntotal/validators/__init__.py renamed to vulntotal/datasources/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
# Visit https://github.com/nexB/vulnerablecode/ for support and download.
2323

2424

25-
VALIDATORS_REGISTRY = []
25+
DATASOURCE_REGISTRY = []
2626

27-
VALIDATORS_REGISTRY = {x.__module__.split(".")[-1]: x for x in VALIDATORS_REGISTRY}
27+
DATASOURCE_REGISTRY = {x.__module__.split(".")[-1]: x for x in DATASOURCE_REGISTRY}
File renamed without changes.

vulntotal/validator.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,22 @@ def to_dict(self):
4343
}
4444

4545

46-
class Validator:
47-
_raw_dump = []
46+
class DataSource:
47+
def __init__(self):
48+
self._raw_dump = []
4849

49-
def validator_advisory(self, purl) -> Iterable[VendorData]:
50+
def datasource_advisory(self, purl) -> Iterable[VendorData]:
5051
"""
51-
Yield VendorData object corresponding to vendor
52+
Yield VendorData object corresponding to DataSource
5253
"""
5354
return NotImplementedError
5455

5556
@classmethod
56-
def support_ecosystem(cls):
57+
def supported_ecosystem(cls):
5758
"""
5859
Return dictionary containing supported ecosystem
5960
{
60-
"PURL equivalent ecosystem" : "Validator ecosystem",
61+
"PURL equivalent ecosystem" : "DataSource ecosystem",
6162
}
6263
"""
6364
return NotImplementedError

0 commit comments

Comments
 (0)