Skip to content

Commit

Permalink
Ruff: add and fix TID (#10113)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Jul 2, 2024
1 parent ed1551a commit aae8b00
Show file tree
Hide file tree
Showing 172 changed files with 172 additions and 342 deletions.
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ select = [
"INP",
"SLOT",
"RSE",
"TID",
"PD",
"PGH",
"TRY003",
Expand Down
3 changes: 1 addition & 2 deletions unittests/authorization/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
Stub_Finding,
Test,
)

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAuthorization(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/authorization/test_authorization_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
from dojo.authorization.authorization_decorators import user_is_authorized, user_is_configuration_authorized
from dojo.authorization.roles_permissions import Permissions
from dojo.models import Product_Type

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAuthorizationDecorators(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/authorization/test_authorization_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
has_object_permission,
user_has_configuration_permission_without_group,
)

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAuthorizationTags(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_acunetix_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from dojo.models import Test
from dojo.tools.acunetix.parser import AcunetixParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAcunetixParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_anchore_engine_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.anchore_engine.parser import AnchoreEngineParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAnchoreEngineParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_anchore_enterprise_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.anchore_enterprise.parser import AnchoreEnterpriseParser, extract_vulnerability_id, search_filepath

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAnchoreEnterpriseParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_anchore_grype_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Finding, Test
from dojo.tools.anchore_grype.parser import AnchoreGrypeParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAnchoreGrypeParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_anchorectl_policies_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.anchorectl_policies.parser import AnchoreCTLPoliciesParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAnchoreCTLPoliciesParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_anchorectl_vulns_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.anchorectl_vulns.parser import AnchoreCTLVulnsParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAnchoreCTLVulnsParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_blackduck_parser.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

from dojo.models import SEVERITIES, Test
from dojo.tools.api_blackduck.parser import ApiBlackduckParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestApiBlackduckParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_cobalt_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from dojo.models import Engagement, Product, Product_API_Scan_Configuration, Test, Tool_Configuration, Tool_Type
from dojo.tools.api_cobalt.importer import CobaltApiImporter

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestCobaltApiImporter(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_cobalt_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from dojo.models import Test, Test_Type
from dojo.tools.api_cobalt.parser import ApiCobaltParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestApiCobaltParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_sonarqube_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from dojo.models import Engagement, Product, Product_API_Scan_Configuration, Test
from dojo.tools.api_sonarqube.importer import SonarQubeApiImporter

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


def dummy_product(self, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_sonarqube_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
Tool_Type,
)
from dojo.tools.api_sonarqube.parser import ApiSonarQubeParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


def dummy_product(self, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_api_vulners_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.api_vulners.parser import ApiVulnersParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestApiVulnersParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_appspider_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Engagement, Finding, Product, Test
from dojo.tools.appspider.parser import AppSpiderParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAppSpiderParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_aqua_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.aqua.parser import AquaParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAquaParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_arachni_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.arachni.parser import ArachniParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestArachniParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_asff_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from dojo.models import Endpoint, Test
from dojo.tools.asff.parser import AsffParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


def sample_path(file_name):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_auditjs_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.auditjs.parser import AuditJSParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAuditJSParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_aws_prowler_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.aws_prowler.parser import AWSProwlerParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAwsProwlerParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_aws_prowler_v3_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.aws_prowler_v3.parser import AWSProwlerV3Parser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAwsProwlerV3Parser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_awssecurityhub_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.awssecurityhub.parser import AwsSecurityHubParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


def sample_path(file_name: str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.azure_security_center_recommendations.parser import AzureSecurityCenterRecommendationsParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestAzureSecurityCenterRecommendationsParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_bandit_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from dojo.models import Test
from dojo.tools.bandit.parser import BanditParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBanditParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_blackduck_binary_analysis_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.blackduck_binary_analysis.parser import BlackduckBinaryAnalysisParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestBlackduckBinaryAnalysisParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_blackduck_component_risk_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.blackduck_component_risk.parser import BlackduckComponentRiskParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestBlackduckComponentRiskParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_blackduck_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.blackduck.parser import BlackduckParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestBlackduckHubParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_brakeman_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.brakeman.parser import BrakemanParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBrakemanParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_bugcrowd_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.bugcrowd.parser import BugCrowdParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBugCrowdParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_bundler_audit_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.bundler_audit.parser import BundlerAuditParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBundlerAuditParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_burp_api_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.burp_api.parser import BurpApiParser, convert_confidence, convert_severity

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_burp_dastardly_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.burp_dastardly.parser import BurpDastardlyParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBurpParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_burp_enterprise_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.burp_enterprise.parser import BurpEnterpriseParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBurpEnterpriseParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_burp_graphql_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.burp_graphql.parser import BurpGraphQLParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBurpGraphQLParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_burp_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.burp.parser import BurpParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestBurpParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_cargo_audit_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dojo.models import Test
from dojo.tools.cargo_audit.parser import CargoAuditParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestCargoAuditParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_checkmarx_one_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Test
from dojo.tools.checkmarx_one.parser import CheckmarxOneParser

from ..dojo_test_case import DojoTestCase
from unittests.dojo_test_case import DojoTestCase


class TestCheckmarxOneParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_checkmarx_osa_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dojo.models import Engagement, Product, Test
from dojo.tools.checkmarx_osa.parser import CheckmarxOsaParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestCheckmarxOsaParser(DojoTestCase):
Expand Down
3 changes: 1 addition & 2 deletions unittests/tools/test_checkmarx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from dojo.models import Engagement, Product, Test
from dojo.tools.checkmarx.parser import CheckmarxParser

from ..dojo_test_case import DojoTestCase, get_unit_tests_path
from unittests.dojo_test_case import DojoTestCase, get_unit_tests_path


class TestCheckmarxParser(DojoTestCase):
Expand Down
Loading

0 comments on commit aae8b00

Please sign in to comment.