diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c57b87bf8..58f2d6e28 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -453,17 +453,17 @@ jobs: # NOTE: The latest and the lowest supported Pythons are prioritized # NOTE: to improve the responsiveness. It's nice to see the most # NOTE: important results first. - - 3.13 - - 3.9 + - 3.14 # str - >- 3.10 + - 3.13 - 3.12 - 3.11 runner-vm-os: - ubuntu-24.04 - - macos-14 - - macos-13 + - macos-15 + - macos-15-intel - windows-2025 toxenv: - pytest diff --git a/.mypy.ini b/.mypy.ini index a92387a64..b5c7808b9 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.9 +python_version = 3.10 color_output = true error_summary = true # IMPORTANT: The file list MUST NOT have a trailing comma after the last entry. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b28af60c..c15a5d27e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -121,53 +121,53 @@ repos: rev: 9f70dc58c23dfcca1b97af99eaeee3140a807c7e # frozen: v1.18.2 hooks: - id: mypy - alias: mypy-py313 - name: MyPy, for Python 3.13 + alias: mypy-py314 + name: MyPy, for Python 3.14 additional_dependencies: - lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report` - pytest - pytest-mock args: - - --python-version=3.13 - - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --html-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.13 - - --txt-report=.tox/.tmp/.test-results/mypy--py-3.13 + - --python-version=3.14 + - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --html-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.14 + - --txt-report=.tox/.tmp/.test-results/mypy--py-3.14 pass_filenames: false - id: mypy - alias: mypy-py311 - name: MyPy, for Python 3.11 + alias: mypy-py312 + name: MyPy, for Python 3.12 additional_dependencies: - lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report` - pytest - pytest-mock args: - - --python-version=3.11 - - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --html-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.11 - - --txt-report=.tox/.tmp/.test-results/mypy--py-3.11 + - --python-version=3.12 + - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --html-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.12 + - --txt-report=.tox/.tmp/.test-results/mypy--py-3.12 pass_filenames: false - id: mypy - alias: mypy-py39 - name: MyPy, for Python 3.9 + alias: mypy-py310 + name: MyPy, for Python 3.10 additional_dependencies: - lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report` - pytest - pytest-mock args: - - --python-version=3.9 - - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --html-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.9 - - --txt-report=.tox/.tmp/.test-results/mypy--py-3.9 + - --python-version=3.10 + - --any-exprs-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --cobertura-xml-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --html-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --linecount-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --linecoverage-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.10 + - --txt-report=.tox/.tmp/.test-results/mypy--py-3.10 pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index afef00e9d..8bcc4f992 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,11 +29,11 @@ classifiers = [ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ] @@ -43,7 +43,7 @@ dynamic = [ 'urls', 'version', ] -requires-python = ">= 3.9" +requires-python = ">= 3.10" [[project.authors]] name = 'Anton Babenko' diff --git a/ruff.toml b/ruff.toml index 0e57620ea..10a18fb0f 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,6 +1,3 @@ -# Assume Python 3.9 -target-version = "py39" - line-length = 79 # To decrease PR diff size namespace-packages = ["src/pre_commit_terraform/", "tests/pytest/"] diff --git a/src/pre_commit_terraform/_types.py b/src/pre_commit_terraform/_types.py index 69f71e690..9d062afbf 100644 --- a/src/pre_commit_terraform/_types.py +++ b/src/pre_commit_terraform/_types.py @@ -2,12 +2,12 @@ from argparse import ArgumentParser, Namespace from collections.abc import Callable -from typing import Protocol, Union +from typing import Protocol from ._structs import ReturnCode -ReturnCodeType = Union[ReturnCode, int] # Union instead of pipe for Python 3.9 +ReturnCodeType = ReturnCode | int CLIAppEntryPointCallableType = Callable[[Namespace], ReturnCodeType]