Browse code

disable pylint warnings recommending with/open syntax

Hanno Böck authored on15/05/2021 08:30:07
Showing1 changed files
... ...
@@ -12,8 +12,8 @@ class TestCodingstyle(unittest.TestCase):
12 12
                        + pyfiles, check=True)
13 13
         subprocess.run(["pyflakes"] + pyfiles, check=True)
14 14
 
15
-        pylint_disable = "missing-docstring,invalid-name," \
16
-                         + "too-many-arguments,duplicate-code"
15
+        pylint_disable = "missing-docstring,invalid-name,duplicate-code," \
16
+                         + "too-many-arguments,consider-using-with"
17 17
         subprocess.run(["pylint", "--disable=%s" % pylint_disable]
18 18
                        + pyfiles, check=True)
19 19
 
Browse code

pyupgrade check

Hanno Böck authored on10/06/2020 20:08:13
Showing1 changed files
... ...
@@ -18,6 +18,8 @@ class TestCodingstyle(unittest.TestCase):
18 18
                        + pyfiles, check=True)
19 19
 
20 20
         subprocess.run(["flake8", "--select=DUO"] + pyfiles, check=True)
21
+        subprocess.run(["pyupgrade", "--keep-percent-format", "--py38-plus"]
22
+                       + pyfiles, check=True)
21 23
 
22 24
 
23 25
 if __name__ == '__main__':
Browse code

use dlint code analyzer

Hanno Böck authored on21/03/2020 13:40:08
Showing1 changed files
... ...
@@ -17,6 +17,8 @@ class TestCodingstyle(unittest.TestCase):
17 17
         subprocess.run(["pylint", "--disable=%s" % pylint_disable]
18 18
                        + pyfiles, check=True)
19 19
 
20
+        subprocess.run(["flake8", "--select=DUO"] + pyfiles, check=True)
21
+
20 22
 
21 23
 if __name__ == '__main__':
22 24
     unittest.main()
Browse code

add update-freewvsdb and setup.py to coding style checks

Hanno Böck authored on23/12/2019 18:15:28
Showing1 changed files
... ...
@@ -6,12 +6,14 @@ import glob
6 6
 class TestCodingstyle(unittest.TestCase):
7 7
     @staticmethod
8 8
     def test_codingstyle():
9
-        pyfiles = ["freewvs"] + glob.glob("tests/*.py")
9
+        pyfiles = ["freewvs", "update-freewvsdb",
10
+                   "setup.py"] + glob.glob("tests/*.py")
10 11
         subprocess.run(["pycodestyle", "--ignore=W503"]
11 12
                        + pyfiles, check=True)
12 13
         subprocess.run(["pyflakes"] + pyfiles, check=True)
13 14
 
14
-        pylint_disable = "missing-docstring,invalid-name,too-many-arguments"
15
+        pylint_disable = "missing-docstring,invalid-name," \
16
+                         + "too-many-arguments,duplicate-code"
15 17
         subprocess.run(["pylint", "--disable=%s" % pylint_disable]
16 18
                        + pyfiles, check=True)
17 19
 
Browse code

disable too-many-arguments pylint test

Hanno Böck authored on22/12/2019 12:31:57
Showing1 changed files
... ...
@@ -10,7 +10,9 @@ class TestCodingstyle(unittest.TestCase):
10 10
         subprocess.run(["pycodestyle", "--ignore=W503"]
11 11
                        + pyfiles, check=True)
12 12
         subprocess.run(["pyflakes"] + pyfiles, check=True)
13
-        subprocess.run(["pylint", "--disable=missing-docstring,invalid-name"]
13
+
14
+        pylint_disable = "missing-docstring,invalid-name,too-many-arguments"
15
+        subprocess.run(["pylint", "--disable=%s" % pylint_disable]
14 16
                        + pyfiles, check=True)
15 17
 
16 18
 
Browse code

add pylint, rename

Hanno Böck authored on22/12/2019 12:17:05
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+import unittest
2
+import subprocess
3
+import glob
4
+
5
+
6
+class TestCodingstyle(unittest.TestCase):
7
+    @staticmethod
8
+    def test_codingstyle():
9
+        pyfiles = ["freewvs"] + glob.glob("tests/*.py")
10
+        subprocess.run(["pycodestyle", "--ignore=W503"]
11
+                       + pyfiles, check=True)
12
+        subprocess.run(["pyflakes"] + pyfiles, check=True)
13
+        subprocess.run(["pylint", "--disable=missing-docstring,invalid-name"]
14
+                       + pyfiles, check=True)
15
+
16
+
17
+if __name__ == '__main__':
18
+    unittest.main()