chore: add PyLint and fix most issues (#999)

* chore: add PyLint and fix most issues

* fix: minor fixes after first push

* chore: remove reference to old toml lib

* chore: minor options cleanup

* ci: only fail with many pylint issues, annotate in GHA

* refactor: address review

* ci: force nox to report in CI

* refactor: use map instead of if chain

* refactor: simpler shell_with_arch

* refactor: even simpler shell_with_arch

* Restore if...elif...else blocks where guard-style is not intended

Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
Henry Schreiner
2022-02-27 14:16:37 -05:00
committed by GitHub
co-authored by Joe Rickerby
parent 6d120e7a6b
commit d6dc3b7cd9
16 changed files with 240 additions and 85 deletions
+10 -5
View File
@@ -15,18 +15,23 @@ concurrency:
cancel-in-progress: true
jobs:
pre-commit:
name: Pre-commit checks (mypy, flake8, etc.)
lint:
name: Linters (mypy, flake8, etc.)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
- run: pipx run nox -s check_manifest
- name: Check manifest
run: pipx run nox -s check_manifest
- name: PyLint checks
run: |
echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
pipx run nox -s pylint
test:
name: Test cibuildwheel on ${{ matrix.os }}
needs: pre-commit
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -67,7 +72,7 @@ jobs:
test-emulated:
name: Test emulated cibuildwheel using qemu
needs: pre-commit
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 180
steps: