Add and fix Flake8 warnings #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint_python | |
on: [pull_request, push, workflow_dispatch] | |
jobs: | |
lint_python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
cache: pip | |
cache-dependency-path: .github/workflows/lint_python.yml | |
- run: pip install --upgrade pip wheel | |
# TODO: remove setuptools installation when safety==2.4.0 is released | |
- run: pip install --upgrade bandit codespell flake8 flake8-bugbear | |
flake8-comprehensions mypy safety setuptools | |
- run: bandit --recursive --skip B101,B404,B603 . | |
- run: codespell --ignore-words-list="commitish" | |
- run: flake8 . --count --ignore=C408,E203,F841,W503 --max-complexity=10 | |
--max-line-length=143 --show-source --statistics | |
- run: pip install --editable . | |
- run: mypy --ignore-missing-imports --install-types --non-interactive . | |
- run: safety check |