diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 393067b1..c53a94f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -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/action@v3.0.1 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 }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6894e4c1..ca1632dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pycodestyle.py b/pycodestyle.py index 6425596e..07eeb49e 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -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) @@ -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: diff --git a/setup.cfg b/setup.cfg index 24c006f0..09a89190 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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