Skip to content

Commit d443d07

Browse files
committed
Correct ruff
1 parent dc9fc50 commit d443d07

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

dojo/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Django starts so that shared_task will use this app.
55
from .celery import app as celery_app # noqa: F401
66

7-
__version__ = '2.37.0-dev'
8-
__url__ = 'https://github.com/DefectDojo/django-DefectDojo'
9-
__docs__ = 'https://documentation.defectdojo.com'
7+
__version__ = "2.37.0-dev"
8+
__url__ = "https://github.com/DefectDojo/django-DefectDojo"
9+
__docs__ = "https://documentation.defectdojo.com"

dojo/filters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,12 +2888,12 @@ class ReportFindingFilterHelper(FilterSet):
28882888

28892889
o = OrderingFilter(
28902890
fields=(
2891-
('title', 'title'),
2892-
('date', 'date'),
2893-
('numerical_severity', 'numerical_severity'),
2894-
('epss_score', 'epss_score'),
2895-
('epss_percentile', 'epss_percentile'),
2896-
('test__engagement__product__name', 'test__engagement__product__name'),
2891+
("title", "title"),
2892+
("date", "date"),
2893+
("numerical_severity", "numerical_severity"),
2894+
("epss_score", "epss_score"),
2895+
("epss_percentile", "epss_percentile"),
2896+
("test__engagement__product__name", "test__engagement__product__name"),
28972897
),
28982898
)
28992899

unittests/test_factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
import logging
12
import os
23
from importlib import import_module
34
from importlib.util import find_spec
45
from inspect import isclass
56

67
from dojo.models import Test, Test_Type
78
from dojo.tools.factory import get_parser
9+
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path
810

9-
from .dojo_test_case import DojoTestCase, get_unit_tests_path
11+
logger = logging.getLogger(__name__)
1012

1113

1214
class TestFactory(DojoTestCase):
@@ -76,5 +78,5 @@ def test_parser_name_matches_module(self):
7678
if not found and module_name != "__pycache__":
7779
missing_parsers.append(module_name)
7880
if len(missing_parsers) > 0:
79-
print(f"Parsers with invalid names: {missing_parsers}")
81+
logger.error(f"Parsers with invalid names: {missing_parsers}")
8082
self.assertEqual(0, len(missing_parsers))

0 commit comments

Comments
 (0)