From: Arie Bovenberg Date: Sun, 6 Feb 2022 20:07:52 +0000 (+0100) Subject: move slotscheck from pre-commit to tox X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41c30ac2393b51a1968fb72456d5db57348f0b1;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git move slotscheck from pre-commit to tox --- diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml index 94db88ba0a..45f62d772c 100644 --- a/.github/workflows/run-on-pr.yaml +++ b/.github/workflows/run-on-pr.yaml @@ -84,8 +84,8 @@ jobs: - name: Run tests run: tox -e mypy ${{ matrix.pytest-args }} - run-pep8: - name: pep8-${{ matrix.python-version }} + run-lint: + name: lint-${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: # run this job using this matrix, excluding some combinations below. @@ -115,7 +115,7 @@ jobs: pip list - name: Run tests - run: tox -e pep8 + run: tox -e lint # Arm emulation is quite slow (~20min) so for now just run it when merging to main # run-test-arm64: diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 196e3c1b15..677721d7a6 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -156,8 +156,8 @@ jobs: - name: Run tests run: tox -e mypy ${{ matrix.pytest-args }} - run-pep8: - name: pep8-${{ matrix.python-version }} + run-lint: + name: lint-${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: # run this job using this matrix, excluding some combinations below. @@ -187,7 +187,7 @@ jobs: pip list - name: Run tests - run: tox -e pep8 + run: tox -e lint run-pep484: name: pep484-${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d80f8bfc14..015d80ecfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,13 +27,6 @@ repos: - pydocstyle - pygments -- repo: https://github.com/ariebovenberg/slotscheck - rev: v0.11.0 - hooks: - - id: slotscheck - exclude: "^(?!lib/sqlalchemy)" - additional_dependencies: - - typing_extensions - - mypy - - greenlet - entry: env PYTHONPATH=lib slotscheck -v + + + diff --git a/tox.ini b/tox.ini index 3e0c3496f1..dcdcd63a66 100644 --- a/tox.ini +++ b/tox.ini @@ -151,7 +151,7 @@ commands = pytest -m mypy {posargs} # thanks to https://julien.danjou.info/the-best-flake8-extensions/ -[testenv:pep8] +[testenv:lint] basepython = python3 deps= flake8 @@ -164,9 +164,12 @@ deps= pydocstyle pygments black==21.12b0 + mypy + slotscheck>=0.12,<0.13 commands = flake8 ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py {posargs} black --check ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py + slotscheck -m sqlalchemy # command run in the github action when cext are active.