From: Petr Štetiar Date: Sat, 23 Dec 2023 06:43:02 +0000 (+0000) Subject: requirements-dev: use black 23.12.1 and ruff 0.1.9 X-Git-Tag: v13~4 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e74dce3085f299c2d8b1a94b09687ae88876ef7c;p=buildbot.git 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 --- 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