Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Trove classifier for Python 3.13 #134

Merged
merged 10 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 33 additions & 41 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,42 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: pyupgrade
args: [--py39-plus]
- id: ruff
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [--add-import=from __future__ import annotations]
AlexWaygood marked this conversation as resolved.
Show resolved Hide resolved

- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: ["--skip=B101,B404,B603"]

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
[
flake8-2020,
flake8-bugbear,
flake8-comprehensions,
flake8-implicit-str-concat,
flake8-logging,
]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.10.1
hooks:
- id: mypy
args:
Expand All @@ -69,20 +51,30 @@ repos:
pass_filenames: false

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.6.0
rev: 2.2.4
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.19
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.4.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: [--ignore-words-list=commitish]

- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes

ci:
autoupdate_schedule: quarterly
2 changes: 1 addition & 1 deletion cherry_picker/cherry_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def is_mirror(self) -> bool:
return out.startswith("true")


CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]}


@click.command(context_settings=CONTEXT_SETTINGS)
Expand Down
42 changes: 30 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ requires = [
[project]
name = "cherry-picker"
readme = "README.md"
maintainers = [{ name = "Python Core Developers", email = "[email protected]" }]
authors = [{ name = "Mariatta Wijaya", email = "[email protected]" }]
maintainers = [ { name = "Python Core Developers", email = "[email protected]" } ]
authors = [ { name = "Mariatta Wijaya", email = "[email protected]" } ]
requires-python = ">=3.8"
classifiers = [
"Intended Audience :: Developers",
Expand All @@ -20,27 +20,24 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [
"description",
"version",
]
dependencies = [
"cffi>=v1.17.0rc1", # remove once v1.17.0 is out; add 3.13 classifier above (see #127)
"click>=6",
"gidgethub",
"requests",
'tomli>=1.1; python_version < "3.11"',
"tomli>=1.1; python_version<'3.11'",
]
[project.optional-dependencies]
dev = [
optional-dependencies.dev = [
"pytest",
"pytest-cov",
]
[project.urls]
"Homepage" = "https://github.com/python/cherry-picker"
[project.scripts]
cherry_picker = "cherry_picker.cherry_picker:cherry_pick_cli"
urls.Homepage = "https://github.com/python/cherry-picker"
scripts.cherry_picker = "cherry_picker.cherry_picker:cherry_pick_cli"

[tool.hatch.version]
source = "vcs"
Expand All @@ -50,5 +47,26 @@ tag-pattern = '^cherry-picker-(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

[tool.isort]
profile = "black"
[tool.ruff]
fix = true

lint.select = [
AlexWaygood marked this conversation as resolved.
Show resolved Hide resolved
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"S", # flake8-bandit
"YTT", # flake8-2020
]

lint.ignore = [
"S101", # Use of assert detected
"S404", # subprocess module is possibly insecure
"S603", # subprocess call: check for execution of untrusted input
]
lint.per-file-ignores."cherry_picker/test_*.py" = [
"S101", # Asserts allowed in tests
]
hugovk marked this conversation as resolved.
Show resolved Hide resolved

[tool.pyproject-fmt]
max_supported_python = "3.13"
19 changes: 10 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[tox]
envlist =
requires =
tox>=4.2
env_list =
py{313, 312, 311, 310, 39}
isolated_build = true

[testenv]
passenv =
FORCE_COLOR
extras =
dev
pass_env =
FORCE_COLOR
commands =
{envpython} -m pytest \
--cov cherry_picker \
--cov-report html \
--cov-report term \
--cov-report xml \
{posargs}
--cov cherry_picker \
--cov-report html \
--cov-report term \
--cov-report xml \
{posargs}