[buildbot] requirements-dev: use black 23.12.1 and ruff 0.1.9
LEDE Commits
lede-commits at lists.infradead.org
Fri Apr 12 23:33:04 PDT 2024
ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/e74dce3085f299c2d8b1a94b09687ae88876ef7c
commit e74dce3085f299c2d8b1a94b09687ae88876ef7c
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sat Dec 23 06:43:02 2023 +0000
requirements-dev: use black 23.12.1 and ruff 0.1.9
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 at true.cz>
---
phase1/master.cfg | 3 ++-
phase2/master.cfg | 2 +-
requirements-dev.txt | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index e9c6b71..e29bb9d 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -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...]
diff --git a/phase2/master.cfg b/phase2/master.cfg
index deebc28..007bc11 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -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
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 033af6b..e373155 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -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
More information about the lede-commits
mailing list