Skip to content

Commit f64c4bb

Browse files
committed
style: fix instances of A001
Signed-off-by: James McCorrie <james.mccorrie@lowrisc.org>
1 parent 5c92082 commit f64c4bb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ruff-ci.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ ignore = [
2323
# High priority fixes
2424
"LOG015", # Using root logger
2525
"B008", # function calls in default arg value
26-
"A001", # variable names mask builtins
2726
"PERF203", # Exception handling in loops
2827

2928
# Temporary ignores just for CI until the rules pass then they can be removed

src/dvsim/launcher/sge/engine.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ def __init__(self, qstat_job_line) -> None:
3131
# Job line must have at least 8 tokens
3232
try:
3333
self.id = int(tokens[0])
34+
3435
except ValueError:
3536
error_msg = "Could not convert data to an integer."
3637
raise ValueError(error_msg)
38+
3739
self.priority = float(tokens[1])
3840
self.name = tokens[2]
3941
self.user = tokens[3]
@@ -78,12 +80,12 @@ def __init__(self, qstat_job_line) -> None:
7880
self._ja_tasklist = ja_task_id
7981

8082
def __repr__(self) -> str:
81-
repr = ["{"]
83+
repr_str = ["{"]
8284
for key, value in self.__dict__.items():
8385
if key[0] != "_":
84-
repr.append(key + "=" + str(value))
85-
repr.append("}")
86-
return "\n".join(repr)
86+
repr_str.append(key + "=" + str(value))
87+
repr_str.append("}")
88+
return "\n".join(repr_str)
8789

8890

8991
class JobList:

src/dvsim/modes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright lowRISC contributors (OpenTitan project).
22
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
# SPDX-License-Identifier: Apache-2.0
4+
45
"""Modes."""
56

67
import logging as log

0 commit comments

Comments
 (0)