Skip to content

Commit

Permalink
CI: compat linting on Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed Dec 10, 2023
1 parent c07b4f6 commit c286f7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc.
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.x" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10" ]
steps:
- uses: actions/checkout@v4
- name: Using Python ${{ matrix.python-version }}
Expand Down
3 changes: 1 addition & 2 deletions gunicorn/http/parser.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Self

from _typeshed import Incomplete
from typing_extensions import Self

from gunicorn.config import Config as Config
from gunicorn.http.message import Request as Request
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ allowlist_externals =
git
bash
commands =
# note we are styling stubs to work on 3.10 - this may not always match code
# isort --check-only will exit 0 on no change, 1 on change
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m isort --check-only'
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m isort --py=310 --check-only'
# black --check will exit 0 on no change, 1 on change, and 123 on error
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m black --check'
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m black --target-version=py310 --check'
# pyupgrade has no readonly option - will set exit code nonzero if writing
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m pyupgrade --py311-plus'
bash -c 'git ls-files -z "**.pyi" | xargs --null python -m pyupgrade --py310-plus'
deps =
isort>=5.13.0
pyupgrade==3.15.0
Expand Down

0 comments on commit c286f7f

Please sign in to comment.