diff --git a/.cspell.json b/.cspell.json index d19b3b2..05285d8 100644 --- a/.cspell.json +++ b/.cspell.json @@ -36,7 +36,6 @@ "**/.cspell.json", ".editorconfig", ".gitignore", - ".gitpod.*", ".pre-commit-config.yaml", ".prettierignore", ".vscode/*", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0163c6..c537429 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,3 +32,5 @@ jobs: secrets: token: ${{ secrets.PAT }} uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1 + with: + python-version: "3.12" diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 52c75dd..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,32 +0,0 @@ -tasks: - - init: pyenv local 3.9 - - init: pip install -e .[dev] - -github: - prebuilds: - master: true - branches: false - pullRequests: true - pullRequestsFromForks: true - addComment: false - addBadge: false - addLabel: false - -vscode: - extensions: - - charliermarsh.ruff - - christian-kohler.path-intellisense - - eamodio.gitlens - - editorconfig.editorconfig - - esbenp.prettier-vscode - - github.vscode-github-actions - - github.vscode-pull-request-github - - mhutchie.git-graph - - ms-python.python - - redhat.vscode-yaml - - soulcode.vscode-unwanted-extensions - - stkb.rewrap - - streetsidesoftware.code-spell-checker - - tamasfe.even-better-toml - - trentrand.git-commit-helper-vscode - - yzhang.markdown-all-in-one diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbdd6e4..6c46539 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,7 +55,9 @@ repos: args: - --allow-deprecated-workflows - --dependabot=update + - --dev-python-version=3.12 - --keep-pr-linting + - --no-gitpod - --no-notebooks - --no-prettierrc - --no-pypi diff --git a/create-pytest-matrix/main.py b/create-pytest-matrix/main.py index 6456123..3d0fa0f 100644 --- a/create-pytest-matrix/main.py +++ b/create-pytest-matrix/main.py @@ -6,10 +6,13 @@ import os from argparse import ArgumentParser from configparser import ConfigParser -from typing import Sequence +from typing import TYPE_CHECKING import toml +if TYPE_CHECKING: + from collections.abc import Sequence + def main(argv: Sequence[str] | None = None) -> int: parser = ArgumentParser(__doc__) @@ -54,7 +57,7 @@ def create_job_matrix( # noqa: C901 msg = ( f"Selected Python {coverage_python_version} for the coverage job, but" " the package only supports Python" - f" {', '.join(supported_python_versions)}" + f" {", ".join(supported_python_versions)}" ) raise ValueError(msg) if coverage_python_version in python_versions: diff --git a/create-python-version-matrix/main.py b/create-python-version-matrix/main.py index de5eb29..64009e7 100644 --- a/create-python-version-matrix/main.py +++ b/create-python-version-matrix/main.py @@ -1,7 +1,5 @@ """Print job matrix for a GitHub Actions workflow that runs `pytest`.""" -from __future__ import annotations - import json import os from configparser import ConfigParser diff --git a/environment.yml b/environment.yml index 4e643a8..ce39239 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: compwa-actions channels: - defaults dependencies: - - python==3.9.* + - python==3.12.* - pip - pip: - -e .[dev] diff --git a/get-pre-commit-taplo-version/main.py b/get-pre-commit-taplo-version/main.py index 6a8c003..9a6ad91 100644 --- a/get-pre-commit-taplo-version/main.py +++ b/get-pre-commit-taplo-version/main.py @@ -1,7 +1,5 @@ """Print job matrix for a GitHub Actions workflow that runs `pytest`.""" -from __future__ import annotations - import os import yaml diff --git a/get-pypi-name/main.py b/get-pypi-name/main.py index ed76a82..467280b 100644 --- a/get-pypi-name/main.py +++ b/get-pypi-name/main.py @@ -1,7 +1,5 @@ """Print job matrix for a GitHub Actions workflow that runs `pytest`.""" -from __future__ import annotations - import os from configparser import ConfigParser diff --git a/get-skipped-pre-commit-hooks/main.py b/get-skipped-pre-commit-hooks/main.py index 5b7de14..696d59b 100644 --- a/get-skipped-pre-commit-hooks/main.py +++ b/get-skipped-pre-commit-hooks/main.py @@ -1,7 +1,5 @@ """Print job matrix for a GitHub Actions workflow that runs `pytest`.""" -from __future__ import annotations - import os import yaml diff --git a/pyproject.toml b/pyproject.toml index 9e9133b..0a58e8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,11 +9,7 @@ classifiers = [ "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.12", "Programming Language :: Python", ] dependencies = ["toml"] @@ -21,7 +17,7 @@ description = "Python scripts used by the ComPWA/actions repository" dynamic = ["version"] license = {text = "License :: OSI Approved :: MIT License"} name = "compwa-actions" -requires-python = ">=3.7" +requires-python = ">=3.12" [project.optional-dependencies] dev = [ @@ -55,7 +51,7 @@ typeCheckingMode = "strict" [tool.ruff] preview = true show-fixes = true -target-version = "py37" +target-version = "py312" [tool.ruff.format] docstring-code-format = true