Skip to content

Commit aa3a94e

Browse files
committed
Configure pyproject-fmt for 3.13 Trove classifier
1 parent 03af6b2 commit aa3a94e

2 files changed

Lines changed: 44 additions & 37 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
1414
rev: v4.6.0
1515
hooks:
16+
- id: check-added-large-files
1617
- id: check-case-conflict
1718
- id: check-merge-conflict
1819
- id: check-json
1920
- id: check-toml
2021
- id: check-yaml
2122
- id: debug-statements
2223
- id: end-of-file-fixer
24+
- id: forbid-submodules
2325
- id: trailing-whitespace
2426
exclude: \.github/ISSUE_TEMPLATE\.md|\.github/PULL_REQUEST_TEMPLATE\.md
2527

@@ -35,7 +37,6 @@ repos:
3537
rev: 2.1.3
3638
hooks:
3739
- id: pyproject-fmt
38-
additional_dependencies: [tox]
3940

4041
- repo: https://github.com/abravalheri/validate-pyproject
4142
rev: v0.18

pyproject.toml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ readme = "README.md"
1212
keywords = [
1313
"humanize time size",
1414
]
15-
license = {text = "MIT"}
16-
maintainers = [{name = "Hugo van Kemenade"}]
17-
authors = [{name = "Jason Moiron", email = "jmoiron@jmoiron.net"}]
15+
license = { text = "MIT" }
16+
maintainers = [
17+
{ name = "Hugo van Kemenade" },
18+
]
19+
authors = [
20+
{ name = "Jason Moiron", email = "jmoiron@jmoiron.net" },
21+
]
1822
requires-python = ">=3.8"
1923
classifiers = [
2024
"Development Status :: 5 - Production/Stable",
@@ -37,19 +41,17 @@ classifiers = [
3741
dynamic = [
3842
"version",
3943
]
40-
[project.optional-dependencies]
41-
tests = [
44+
optional-dependencies.tests = [
4245
"freezegun",
4346
"pytest",
4447
"pytest-cov",
4548
]
46-
[project.urls]
47-
Documentation = "https://humanize.readthedocs.io/"
48-
Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi"
49-
Homepage = "https://github.com/python-humanize/humanize"
50-
"Issue tracker" = "https://github.com/python-humanize/humanize/issues"
51-
"Release notes" = "https://github.com/python-humanize/humanize/releases"
52-
Source = "https://github.com/python-humanize/humanize"
49+
urls.Documentation = "https://humanize.readthedocs.io/"
50+
urls.Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi"
51+
urls.Homepage = "https://github.com/python-humanize/humanize"
52+
urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues"
53+
urls."Release notes" = "https://github.com/python-humanize/humanize/releases"
54+
urls.Source = "https://github.com/python-humanize/humanize"
5355

5456
[tool.hatch]
5557
version.source = "vcs"
@@ -65,38 +67,42 @@ local_scheme = "no-local-version"
6567
[tool.ruff]
6668
fix = true
6769

68-
[tool.ruff.lint]
69-
select = [
70-
"C4", # flake8-comprehensions
71-
"D", # pydocstyle
72-
"E", # pycodestyle errors
73-
"EM", # flake8-errmsg
74-
"F", # pyflakes errors
75-
"I", # isort
76-
"ISC", # flake8-implicit-str-concat
77-
"LOG", # flake8-logging
78-
"PGH", # pygrep-hooks
70+
lint.select = [
71+
"C4", # flake8-comprehensions
72+
"D", # pydocstyle
73+
"E", # pycodestyle errors
74+
"EM", # flake8-errmsg
75+
"F", # pyflakes errors
76+
"I", # isort
77+
"ISC", # flake8-implicit-str-concat
78+
"LOG", # flake8-logging
79+
"PGH", # pygrep-hooks
80+
"PYI", # flake8-pyi
81+
"RUF022", # unsorted-dunder-all
7982
"RUF100", # unused noqa (yesqa)
80-
"UP", # pyupgrade
81-
"W", # pycodestyle warnings
82-
"YTT", # flake8-2020
83+
"UP", # pyupgrade
84+
"W", # pycodestyle warnings
85+
"YTT", # flake8-2020
8386
]
84-
extend-ignore = [
87+
lint.extend-ignore = [
8588
"E203", # Whitespace before ':'
8689
"E221", # Multiple spaces before operator
8790
"E226", # Missing whitespace around arithmetic operator
8891
"E241", # Multiple spaces after ','
8992
]
93+
lint.per-file-ignores."tests/*" = [
94+
"D",
95+
]
96+
lint.isort.known-first-party = [
97+
"humanize",
98+
]
99+
lint.isort.required-imports = [
100+
"from __future__ import annotations",
101+
]
102+
pydocstyle.convention = "google"
90103

91-
[tool.ruff.lint.isort]
92-
known-first-party = ["humanize"]
93-
required-imports = ["from __future__ import annotations"]
94-
95-
[tool.ruff.pydocstyle]
96-
convention = "google"
97-
98-
[tool.ruff.lint.per-file-ignores]
99-
"tests/*" = ["D"]
104+
[tool.pyproject-fmt]
105+
max_supported_python = "3.13"
100106

101107
[tool.pytest.ini_options]
102108
addopts = "--color=yes"

0 commit comments

Comments
 (0)