fix ruff warnings
Hanno Böck

Hanno Böck commited on 2024-12-03 21:50:00
Zeige 1 geänderte Dateien mit 7 Einfügungen und 7 Löschungen.

... ...
@@ -6,21 +6,21 @@ import unittest
6 6
 class TestCodingstyle(unittest.TestCase):
7 7
     @staticmethod
8 8
     def test_codingstyle():
9
-        pyfiles = ["freewvs", "update-freewvsdb", "setup.py"] + glob.glob("tests/*.py")
9
+        pyfiles = ["freewvs", "update-freewvsdb", "setup.py", *glob.glob("tests/*.py")]
10 10
         subprocess.run(
11
-            ["pycodestyle", "--ignore=W503,E501", "--max-line-length=88"] + pyfiles,
11
+            ["pycodestyle", "--ignore=W503,E501", "--max-line-length=88", *pyfiles],
12 12
             check=True,
13 13
         )
14
-        subprocess.run(["pyflakes"] + pyfiles, check=True)
14
+        subprocess.run(["pyflakes", *pyfiles], check=True)
15 15
 
16 16
         pylint_disable = (
17 17
             "missing-docstring,invalid-name,duplicate-code,"
18
-            + "too-many-arguments,consider-using-with,too-many-positional-arguments"
18
+            "too-many-arguments,consider-using-with,too-many-positional-arguments"
19 19
         )
20
-        subprocess.run(["pylint", f"--disable={pylint_disable}"] + pyfiles, check=True)
20
+        subprocess.run(["pylint", f"--disable={pylint_disable}", *pyfiles], check=True)
21 21
 
22
-        subprocess.run(["flake8", "--select=DUO"] + pyfiles, check=True)
23
-        subprocess.run(["pyupgrade", "--py311-plus"] + pyfiles, check=True)
22
+        subprocess.run(["flake8", "--select=DUO", *pyfiles], check=True)
23
+        subprocess.run(["pyupgrade", "--py311-plus", *pyfiles], check=True)
24 24
 
25 25
 
26 26
 if __name__ == "__main__":
27 27