This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Update README.md #103
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] | |
jobs: | |
lint_python: | |
runs-on: ubuntu-latest | |
env: | |
ia_sandbox: ${{ secrets.ia_sandbox }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
cache: 'poetry' | |
- run: pip install --upgrade pip wheel | |
- run: poetry install --with=dev | |
- run: poetry run bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements | |
- run: poetry run black --check . | |
- run: poetry run codespell # --ignore-words-sparql_items="" --skip="*.css,*.js,*.lock" | |
- run: poetry run flake8 --ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503 | |
--max-complexity=21 --max-line-length=162 --show-source --statistics . | |
# disabled because it returns a ton of false warnings | |
# - run: poetry run isort --check-only --profile black .||true | |
- run: mkdir --parents --verbose .mypy_cache | |
- run: poetry run mypy --ignore-missing-imports --install-types --non-interactive . | |
- run: cp config.example.py config.py | |
- run: poetry run pytest --exitfirst . | |
- run: shopt -s globstar && poetry run pyupgrade --keep-runtime-typing --py37-plus **/*.py | |
- run: poetry run safety check |