Skip to content

Commit

Permalink
requirements-dev: use black 23.12.1 and ruff 0.1.9
Browse files Browse the repository at this point in the history
Fix ruff's recommendation:

 phase2/master.cfg:328:16: E721 Do not compare types, use `isinstance()`

 "Unlike a direct type comparison, isinstance will also check if an
  object is an instance of a class or a subclass thereof."

Signed-off-by: Petr Štetiar <ynezz@true.cz>
  • Loading branch information
ynezz committed Dec 24, 2023
1 parent 03abd02 commit e8bfef1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion phase1/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def prioritizeBuilders(master, builders):
pos = 99
for name, prio in bldrNamePrio.items():
if bldr.name.startswith(name):
pos = prio + 50 - min(hiprio, 50) # higher priority (larger positive number) raises position
# higher priority (larger positive number) raises position
pos = prio + 50 - min(hiprio, 50)
break

# pos order: janitor/local (0), tag builds if any [1..50], !tag builds [51...]
Expand Down
2 changes: 1 addition & 1 deletion phase2/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def IsArchitectureSelected(target):
def CheckArchitectureProperty(step):
try:
options = step.getProperty("options")
if type(options) is dict:
if isinstance(options, dict):
selected_arch = options.get("architecture", "all")
if selected_arch != "all" and selected_arch != target:
return False
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cram==0.7
black==23.3.0
ruff==0.0.267
black==23.12.1
ruff==0.1.9
flake8==6.1.0

0 comments on commit e8bfef1

Please sign in to comment.