From 780d83ab7d43086d04aaf25928e47dc337d36f65 Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Thu, 8 Oct 2026 15:35:52 -0400 Subject: [PATCH] py311+ --- .github/workflows/main.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- setup.cfg | 2 +- tests/test_api.py | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93c75eeb..2875f9ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,12 +9,12 @@ jobs: main-windows: uses: asottile/workflows/.github/workflows/tox.yml@v1.11.1 with: - env: '["py310"]' + env: '["py311"]' os: windows-latest main-linux: uses: asottile/workflows/.github/workflows/tox.yml@v1.11.1 with: - env: '["pypy3", "py310", "py311", "py312", "py313", "py314", "py315"]' + env: '["pypy3", "py311", "py312", "py313", "py314", "py315"]' os: ubuntu-latest main-other: uses: asottile/workflows/.github/workflows/tox.yml@v1.11.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd1f6641..67537e72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,12 +11,12 @@ repos: rev: v3.17.0 hooks: - id: reorder-python-imports - args: [--py310-plus] + args: [--py311-plus] - repo: https://github.com/asottile/pyupgrade rev: v3.21.2 hooks: - id: pyupgrade - args: [--py310-plus] + args: [--py311-plus] - repo: https://github.com/asottile/setup-cfg-fmt rev: v3.2.0 hooks: diff --git a/setup.cfg b/setup.cfg index e2bd7c0f..7886e804 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ project_urls = [options] py_modules = pycodestyle -python_requires = >=3.10 +python_requires = >=3.11 include_package_data = True zip_safe = False diff --git a/tests/test_api.py b/tests/test_api.py index 50cb1b83..ad98aaac 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -328,9 +328,7 @@ def test_check_nullbytes(self): count_errors = pep8style.input_file('stdin', lines=['\x00\n']) stdout = sys.stdout.getvalue() - if sys.version_info < (3, 11, 4): # pragma: <3.11 cover - expected = ["stdin:1:1: E901 ValueError: source code string cannot contain null bytes"] # noqa: E501 - elif sys.version_info < (3, 12): # pragma: <3.12 cover # pragma: >=3.11 cover # noqa: E501 + if sys.version_info < (3, 12): # pragma: <3.12 cover expected = ["stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes"] # noqa: E501 else: # pragma: >=3.12 cover expected = [