git.schokokeks.org
Repositories
Help
Report an Issue
freewvs.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
0c67780
Branches
Tags
master
v0.1.1
v0.1.2
v0.1.3
v0.1.4
freewvs.git
tests
test_codingstyle.py
fix ruff warnings
Hanno Böck
commited
0c67780
at 2024-12-03 21:50:00
test_codingstyle.py
Blame
History
Raw
import glob import subprocess import unittest class TestCodingstyle(unittest.TestCase): @staticmethod def test_codingstyle(): pyfiles = ["freewvs", "update-freewvsdb", "setup.py", *glob.glob("tests/*.py")] subprocess.run( ["pycodestyle", "--ignore=W503,E501", "--max-line-length=88", *pyfiles], check=True, ) subprocess.run(["pyflakes", *pyfiles], check=True) pylint_disable = ( "missing-docstring,invalid-name,duplicate-code," "too-many-arguments,consider-using-with,too-many-positional-arguments" ) subprocess.run(["pylint", f"--disable={pylint_disable}", *pyfiles], check=True) subprocess.run(["flake8", "--select=DUO", *pyfiles], check=True) subprocess.run(["pyupgrade", "--py311-plus", *pyfiles], check=True) if __name__ == "__main__": unittest.main()