Skip to content

Commit

Permalink
Resolve a few final nits
Browse files Browse the repository at this point in the history
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Co-authored-by: Philippe Ombredanne <pombredanne@gmail.com>
  • Loading branch information
Hritik14 and pombredanne committed Feb 7, 2022
1 parent c62f81f commit 45cdaf5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vulnerabilities/import_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run(self) -> None:
def process_advisories(advisory_datas: Iterable[AdvisoryData], importer_name: str) -> List:
"""
Insert advisories into the database
Return list of ids of inserted advisories
Return the number of inserted advisories.
"""
count = 0
for data in advisory_datas:
Expand Down
5 changes: 2 additions & 3 deletions vulnerabilities/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from typing import Set
from typing import Iterable
from typing import Tuple
import warnings

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

@classproperty
def qualified_name(self):
def qualified_name(cls):
"""
Fully qualified name prefixed with the module name of the improver used in logging.
"""
return f"{self.__module__}.{self.__qualname__}"
return f"{cls.__module__}.{cls.__qualname__}"

def advisory_data(self) -> Iterable[AdvisoryData]:
"""
Expand Down
4 changes: 2 additions & 2 deletions vulnerabilities/improver.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ class Improver:
"""

@classproperty
def qualified_name(self):
def qualified_name(cls):
"""
Fully qualified name prefixed with the module name of the improver used in logging.
"""
return f"{self.__module__}.{self.__qualname__}"
return f"{cls.__module__}.{cls.__qualname__}"

@property
def interesting_advisories(self) -> QuerySet:
Expand Down

0 comments on commit 45cdaf5

Please sign in to comment.