requirements-dev: use black 23.12.1 and ruff 0.1.9
authorPetr Štetiar <ynezz@true.cz>
Sat, 23 Dec 2023 06:43:02 +0000 (06:43 +0000)
committerPetr Štetiar <ynezz@true.cz>
Sat, 13 Apr 2024 04:17:49 +0000 (06:17 +0200)
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>
phase1/master.cfg
phase2/master.cfg
requirements-dev.txt

index e9c6b71190e332806d79f87e34bc95725a61cbe0..e29bb9dd9f062ad2f59f2796f2d4936f163b8c6b 100644 (file)
@@ -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...]
index deebc2894b5808706400b0ccafccad5c88800f0a..007bc1123349162b0656dc825de635d46463f4bb 100644 (file)
@@ -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
index 033af6bbc2af928e2e7068e69ccb1e5e23d0df16..e373155b03b77f05156cf6566d4158860f2eac4c 100644 (file)
@@ -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