Skip to content

Commit 2fc4136

Browse files
authored
Ruff: Add and fix B903 (#11956)
1 parent 51d8ddb commit 2fc4136

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dojo/tools/checkmarx_cxflow_sast/parser.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
import logging
3+
from dataclasses import dataclass
34

45
import dateutil.parser
56

@@ -29,12 +30,12 @@ def from_json_object(cls, data):
2930
)
3031

3132

33+
@dataclass
3234
class _Path:
33-
def __init__(self, sink: _PathNode, source: _PathNode, state: str, paths: [_PathNode]):
34-
self.sink = sink
35-
self.source = source
36-
self.state = state
37-
self.paths = paths
35+
sink: _PathNode
36+
source: _PathNode
37+
state: str
38+
paths: [_PathNode]
3839

3940

4041
class CheckmarxCXFlowSastParser:

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ select = [
8888
"B009",
8989
"B010",
9090
"B033",
91+
"B903",
9192
"B905",
9293
]
9394
ignore = [

0 commit comments

Comments
 (0)