Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.10.12'
- run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety

- run: pip install poetry
- name: Install same versions as in pre-commit hook
run: poetry install --with dev
- run: poetry run pre-commit run --all-files

- run: pip install bandit codespell flake8 mypy pytest pyupgrade safety
- run: bandit --recursive --skip B101 .
- run: black --check .
- run: codespell --ignore-words-list= Bu
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --show-source --statistics
- run: isort --check-only --profile black .
- run: pip install -r requirements.txt
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
- run: pytest . || pytest --doctest-modules . || true
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fail_fast: true
repos:
- repo: local
hooks:
- id: black
name: black
entry: poetry run black
language: system
types: [file, python]
- id: isort
name: isort
entry: poetry run isort --profile black
language: system
types: [file, python]
Loading