Skip to content

Commit 45cdaf5

Browse files
Hritik14pombredanne
andcommitted
Resolve a few final nits
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com> Co-authored-by: Philippe Ombredanne <pombredanne@gmail.com>
1 parent c62f81f commit 45cdaf5

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

vulnerabilities/import_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(self) -> None:
6666
def process_advisories(advisory_datas: Iterable[AdvisoryData], importer_name: str) -> List:
6767
"""
6868
Insert advisories into the database
69-
Return list of ids of inserted advisories
69+
Return the number of inserted advisories.
7070
"""
7171
count = 0
7272
for data in advisory_datas:

vulnerabilities/importer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from typing import Set
3535
from typing import Iterable
3636
from typing import Tuple
37-
import warnings
3837

3938
from binaryornot.helpers import is_binary_string
4039
from git import DiffIndex
@@ -230,11 +229,11 @@ def __init__(self):
230229
raise Exception(f"Cannot run importer {self!r} without a license")
231230

232231
@classproperty
233-
def qualified_name(self):
232+
def qualified_name(cls):
234233
"""
235234
Fully qualified name prefixed with the module name of the improver used in logging.
236235
"""
237-
return f"{self.__module__}.{self.__qualname__}"
236+
return f"{cls.__module__}.{cls.__qualname__}"
238237

239238
def advisory_data(self) -> Iterable[AdvisoryData]:
240239
"""

vulnerabilities/improver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ class Improver:
8181
"""
8282

8383
@classproperty
84-
def qualified_name(self):
84+
def qualified_name(cls):
8585
"""
8686
Fully qualified name prefixed with the module name of the improver used in logging.
8787
"""
88-
return f"{self.__module__}.{self.__qualname__}"
88+
return f"{cls.__module__}.{cls.__qualname__}"
8989

9090
@property
9191
def interesting_advisories(self) -> QuerySet:

0 commit comments

Comments
 (0)