Skip to content

Commit

Permalink
Merge pull request #1267 from PyCQA/py39-plus
Browse files Browse the repository at this point in the history
py39-plus
  • Loading branch information
asottile authored Oct 22, 2024
2 parents 8e5acee + 414f470 commit 154a47f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
- os: ubuntu-latest
py: pypy3.10
toxenv: py
- os: ubuntu-latest
py: 3.8
toxenv: py
- os: ubuntu-latest
py: 3.9
toxenv: py
Expand All @@ -29,7 +26,13 @@ jobs:
py: '3.11'
toxenv: py
- os: ubuntu-latest
py: '3.12-dev'
py: '3.12'
toxenv: py
- os: ubuntu-latest
py: '3.13'
toxenv: py
- os: ubuntu-latest
py: '3.14-dev'
toxenv: py
- os: ubuntu-latest
py: 3.9
Expand All @@ -40,10 +43,10 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
if: matrix.py != '3.12-dev'
if: matrix.py != '3.14-dev'
- uses: deadsnakes/[email protected]
with:
python-version: ${{ matrix.py }}
if: matrix.py == '3.12-dev'
if: matrix.py == '3.14-dev'
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repos:
rev: v3.13.0
hooks:
- id: reorder-python-imports
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
Expand Down
7 changes: 2 additions & 5 deletions pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ def whitespace_before_parameters(logical_line, tokens):
# Allow "return (a.foo for a in range(5))"
not keyword.iskeyword(prev_text) and
(
sys.version_info < (3, 9) or
# 3.12+: type is a soft keyword but no braces after
prev_text == 'type' or
not keyword.issoftkeyword(prev_text)
Expand Down Expand Up @@ -960,10 +959,8 @@ def missing_whitespace(logical_line, tokens):
# Allow argument unpacking: foo(*args, **kwargs).
if prev_type == tokenize.OP and prev_text in '}])' or (
prev_type != tokenize.OP and
prev_text not in KEYWORDS and (
sys.version_info < (3, 9) or
not keyword.issoftkeyword(prev_text)
)
prev_text not in KEYWORDS and
not keyword.issoftkeyword(prev_text)
):
need_space = None
elif text in WS_OPTIONAL_OPERATORS:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ project_urls =

[options]
py_modules = pycodestyle
python_requires = >=3.8
python_requires = >=3.9
include_package_data = True
zip_safe = False

Expand Down

0 comments on commit 154a47f

Please sign in to comment.