Skip to content

Commit 7543a08

Browse files
hugovkAlexWaygood
andauthored
Add Trove classifier for Python 3.13 (#134)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent a7d8aee commit 7543a08

4 files changed

Lines changed: 80 additions & 63 deletions

File tree

.pre-commit-config.yaml

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,42 @@
11
repos:
2-
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.15.0
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.6.7
44
hooks:
5-
- id: pyupgrade
6-
args: [--py39-plus]
5+
- id: ruff
6+
args: [--exit-non-zero-on-fix]
77

88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 23.12.1
9+
rev: 24.8.0
1010
hooks:
1111
- id: black
1212

13-
- repo: https://github.com/PyCQA/isort
14-
rev: 5.13.2
15-
hooks:
16-
- id: isort
17-
args: [--add-import=from __future__ import annotations]
18-
19-
- repo: https://github.com/PyCQA/bandit
20-
rev: 1.7.6
21-
hooks:
22-
- id: bandit
23-
args: ["--skip=B101,B404,B603"]
24-
25-
- repo: https://github.com/PyCQA/flake8
26-
rev: 7.0.0
27-
hooks:
28-
- id: flake8
29-
additional_dependencies:
30-
[
31-
flake8-2020,
32-
flake8-bugbear,
33-
flake8-comprehensions,
34-
flake8-implicit-str-concat,
35-
flake8-logging,
36-
]
37-
38-
- repo: https://github.com/pre-commit/pygrep-hooks
39-
rev: v1.10.0
40-
hooks:
41-
- id: python-check-blanket-noqa
42-
4313
- repo: https://github.com/pre-commit/pre-commit-hooks
44-
rev: v4.5.0
14+
rev: v4.6.0
4515
hooks:
16+
- id: check-added-large-files
4617
- id: check-case-conflict
4718
- id: check-executables-have-shebangs
4819
- id: check-merge-conflict
49-
- id: check-json
5020
- id: check-toml
5121
- id: check-yaml
5222
- id: debug-statements
5323
- id: end-of-file-fixer
24+
- id: forbid-submodules
5425
- id: trailing-whitespace
5526

27+
- repo: https://github.com/python-jsonschema/check-jsonschema
28+
rev: 0.29.2
29+
hooks:
30+
- id: check-dependabot
31+
- id: check-github-workflows
32+
33+
- repo: https://github.com/rhysd/actionlint
34+
rev: v1.7.1
35+
hooks:
36+
- id: actionlint
37+
5638
- repo: https://github.com/pre-commit/mirrors-mypy
57-
rev: v1.8.0
39+
rev: v1.10.1
5840
hooks:
5941
- id: mypy
6042
args:
@@ -69,20 +51,30 @@ repos:
6951
pass_filenames: false
7052

7153
- repo: https://github.com/tox-dev/pyproject-fmt
72-
rev: 1.6.0
54+
rev: 2.2.4
7355
hooks:
7456
- id: pyproject-fmt
7557

7658
- repo: https://github.com/abravalheri/validate-pyproject
77-
rev: v0.15
59+
rev: v0.19
7860
hooks:
7961
- id: validate-pyproject
8062

63+
- repo: https://github.com/tox-dev/tox-ini-fmt
64+
rev: 1.4.1
65+
hooks:
66+
- id: tox-ini-fmt
67+
8168
- repo: https://github.com/codespell-project/codespell
82-
rev: v2.2.6
69+
rev: v2.3.0
8370
hooks:
8471
- id: codespell
8572
args: [--ignore-words-list=commitish]
8673

74+
- repo: meta
75+
hooks:
76+
- id: check-hooks-apply
77+
- id: check-useless-excludes
78+
8779
ci:
8880
autoupdate_schedule: quarterly

cherry_picker/cherry_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def is_mirror(self) -> bool:
702702
return out.startswith("true")
703703

704704

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

707707

708708
@click.command(context_settings=CONTEXT_SETTINGS)

pyproject.toml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ requires = [
88
[project]
99
name = "cherry-picker"
1010
readme = "README.md"
11-
maintainers = [{ name = "Python Core Developers", email = "core-workflow@python.org" }]
12-
authors = [{ name = "Mariatta Wijaya", email = "mariatta@python.org" }]
11+
maintainers = [ { name = "Python Core Developers", email = "core-workflow@python.org" } ]
12+
authors = [ { name = "Mariatta Wijaya", email = "mariatta@python.org" } ]
1313
requires-python = ">=3.8"
1414
classifiers = [
1515
"Intended Audience :: Developers",
@@ -20,27 +20,24 @@ classifiers = [
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2324
]
2425
dynamic = [
2526
"description",
2627
"version",
2728
]
2829
dependencies = [
29-
"cffi>=v1.17.0rc1", # remove once v1.17.0 is out; add 3.13 classifier above (see #127)
3030
"click>=6",
3131
"gidgethub",
3232
"requests",
33-
'tomli>=1.1; python_version < "3.11"',
33+
"tomli>=1.1; python_version<'3.11'",
3434
]
35-
[project.optional-dependencies]
36-
dev = [
35+
optional-dependencies.dev = [
3736
"pytest",
3837
"pytest-cov",
3938
]
40-
[project.urls]
41-
"Homepage" = "https://github.com/python/cherry-picker"
42-
[project.scripts]
43-
cherry_picker = "cherry_picker.cherry_picker:cherry_pick_cli"
39+
urls.Homepage = "https://github.com/python/cherry-picker"
40+
scripts.cherry_picker = "cherry_picker.cherry_picker:cherry_pick_cli"
4441

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

53-
[tool.isort]
54-
profile = "black"
50+
[tool.ruff]
51+
fix = true
52+
53+
lint.select = [
54+
"C4", # flake8-comprehensions
55+
"E", # pycodestyle errors
56+
"F", # pyflakes errors
57+
"I", # isort
58+
"ICN", # flake8-import-conventions
59+
"ISC", # flake8-implicit-str-concat
60+
"LOG", # flake8-logging
61+
"PGH", # pygrep-hooks
62+
"PYI", # flake8-pyi
63+
"RUF022", # unsorted-dunder-all
64+
"RUF100", # unused noqa (yesqa)
65+
"S", # flake8-bandit
66+
"UP", # pyupgrade
67+
"W", # pycodestyle warnings
68+
"YTT", # flake8-2020
69+
]
70+
lint.ignore = [
71+
"S101", # Use of assert detected
72+
"S404", # subprocess module is possibly insecure
73+
"S603", # subprocess call: check for execution of untrusted input
74+
]
75+
lint.isort.required-imports = [ "from __future__ import annotations" ]
76+
77+
[tool.pyproject-fmt]
78+
max_supported_python = "3.13"

tox.ini

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
[tox]
2-
envlist =
2+
requires =
3+
tox>=4.2
4+
env_list =
35
py{313, 312, 311, 310, 39}
4-
isolated_build = true
56

67
[testenv]
7-
passenv =
8-
FORCE_COLOR
98
extras =
109
dev
10+
pass_env =
11+
FORCE_COLOR
1112
commands =
1213
{envpython} -m pytest \
13-
--cov cherry_picker \
14-
--cov-report html \
15-
--cov-report term \
16-
--cov-report xml \
17-
{posargs}
14+
--cov cherry_picker \
15+
--cov-report html \
16+
--cov-report term \
17+
--cov-report xml \
18+
{posargs}

0 commit comments

Comments
 (0)