Skip to content

Commit

Permalink
use flake8 instead of pylint
Browse files Browse the repository at this point in the history
add mypy to tox
  • Loading branch information
grothe6 committed Aug 14, 2023
1 parent 6d01df6 commit 842c3c1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
permissions: {}

jobs:
pylint:
flake8:
strategy:
matrix:
python-version: ["3.11"]
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pre-commit
pyupgrade
black

pylint
flake8
mypy

pytest
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tox]
envlist =
py{39,310,311}
lint
flake8
mypy

[testenv:py{39,310,311}]
deps =
Expand All @@ -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}

0 comments on commit 842c3c1

Please sign in to comment.