Skip to content

Commit b3d2c96

Browse files
authored
Ruff: Add and autofix PERF403 (#12371)
1 parent 4243bb5 commit b3d2c96

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

dojo/tools/openvas/csv_parser.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,7 @@ def create_chain(self):
263263
return date_column_strategy
264264

265265
def read_column_names(self, row):
266-
column_names = {}
267-
for index, column in enumerate(row):
268-
column_names[index] = column
269-
return column_names
266+
return dict(enumerate(row))
270267

271268
def get_findings(self, filename, test):
272269
column_names = {}

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ select = [
8989
"DOC202", "DOC403", "DOC502",
9090
"RUF",
9191
"B00", "B010", "B011", "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B019", "B020", "B021", "B022", "B023", "B025", "B028", "B029", "B03", "B901", "B903", "B905", "B911",
92-
"PERF1", "PERF2",
92+
"PERF1", "PERF2", "PERF403",
9393
]
9494
ignore = [
9595
"E501",

0 commit comments

Comments
 (0)