Skip to content

Commit

Permalink
Ruff: add and fix PYI
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Jun 22, 2024
1 parent 91de2e8 commit 356b884
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dojo/tools/blackduck/model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from collections import namedtuple
from typing import NamedTuple

# this class can be updated to use @dataclass in Python 3.7
# note that all types are strings except for 'locations' which is a set of
# strings
BlackduckFinding = namedtuple(
BlackduckFinding = NamedTuple(
"BlackduckFinding",
[
"vuln_id",
Expand Down
4 changes: 2 additions & 2 deletions dojo/tools/blackduck_binary_analysis/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import namedtuple
from typing import NamedTuple

BlackduckBinaryAnalysisFinding = namedtuple(
BlackduckBinaryAnalysisFinding = NamedTuple(
"BlackduckBinaryAnalysisFinding",
[
"report_name",
Expand Down
4 changes: 2 additions & 2 deletions dojo/tools/ort/parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hashlib
import json
from collections import namedtuple
from typing import NamedTuple

from dojo.models import Finding

Expand Down Expand Up @@ -192,7 +192,7 @@ def get_item(model, test):
# projects: []
# rule_violation: dict

RuleViolationModel = namedtuple(
RuleViolationModel = NamedTuple(
"RuleViolationModel", ["pkg", "license_id", "projects", "rule_violation"]
)

Expand Down
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ select = [
"LOG",
"INP",
"SLOT",
"PYI",
"RSE",
"PD",
"PGH",
Expand Down

0 comments on commit 356b884

Please sign in to comment.