diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 15389d77..0be56edd 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -8,7 +8,7 @@ on: permissions: {} jobs: - pylint: + flake8: strategy: matrix: python-version: ["3.11"] @@ -25,12 +25,18 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install flake8 - name: Install package run: python -m pip install -e . - - name: Analysing the code with pylint + - name: Analysing the code with flake8 run: | - pylint src + flake8 --color=never --tee --output-file=flake8-output src + - name: Upload flake8 output + uses: actions/upload-artifact@v3 + with: + name: flake8-output + path: flake8-output + if: always() mypy: strategy: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfcdc784..2c010100 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,3 +29,7 @@ repos: hooks: - id: black args: ["--line-length", "120"] +- repo: https://github.com/pycqa/flake8 + rev: 6.1.0 + hooks: + - id: flake8 \ No newline at end of file diff --git a/dev_requirements.txt b/dev_requirements.txt index 1e215d82..2c70a103 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -9,7 +9,7 @@ pre-commit pyupgrade black -pylint +flake8 mypy pytest diff --git a/setup.cfg b/setup.cfg index eb32ba54..88d61f3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,10 +3,8 @@ package_dir = = src packages = find: -[pylint.master] +[flake8] max-line-length = 120 -ignore = FZJ_Decadac.py,Example_measurements.py,SET_testing.py -extension-pkg-whitelist = PyQt5 [mypy] show_error_codes = True diff --git a/tox.ini b/tox.ini index 5ac19c1d..d83f44d1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] envlist = py{39,310,311} - lint + flake8 + mypy [testenv:py{39,310,311}] deps = @@ -13,9 +14,14 @@ deps = commands = pytest --cov=src/qumada --cov-report term src/tests {posargs} -[testenv:lint] +[testenv:flake8] deps = - pylint - pylint-gitlab + flake8 commands = - pylint src {posargs} + flake8 src {posargs} + +[testenv:mypy] +deps = + mypy +commands = + mypy src {posargs}