Skip to content

Commit e1898e3

Browse files
authored
Add pyproject-fmt (#330)
1 parent af98022 commit e1898e3

File tree

2 files changed

+55
-33
lines changed

2 files changed

+55
-33
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ repos:
7171
hooks:
7272
- id: check-hooks-apply
7373
- id: check-useless-excludes
74+
- repo: https://github.com/tox-dev/pyproject-fmt
75+
rev: "0.9.2"
76+
hooks:
77+
- id: pyproject-fmt

pyproject.toml

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,46 @@
11
[build-system]
22
build-backend = "hatchling.build"
3-
requires = ["hatchling>=1.13", "hatch-vcs>=0.3"]
3+
requires = [
4+
"hatch-vcs>=0.3",
5+
"hatchling>=1.13",
6+
]
47

58
[project]
6-
name = "sphinx_autodoc_typehints"
9+
name = "sphinx-autodoc-typehints"
710
description = "Type hints (PEP 484) support for the Sphinx autodoc extension"
8-
readme.file = "README.md"
911
readme.content-type = "text/markdown"
10-
keywords = ["virtual", "environments", "isolated", "testing"]
12+
readme.file = "README.md"
13+
keywords = [
14+
"environments",
15+
"isolated",
16+
"testing",
17+
"virtual",
18+
]
1119
license = "MIT"
12-
urls.Homepage = "https://github.com/tox-dev/sphinx-autodoc-typehints"
13-
urls.Source = "https://github.com/tox-dev/sphinx-autodoc-typehints"
14-
urls.Tracker = "https://github.com/tox-dev/sphinx-autodoc-typehints/issues"
15-
urls.Changelog = "https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md"
16-
authors = [{ name = "Bernát Gábor", email = "[email protected]" }]
1720
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }]
21+
authors = [{ name = "Bernát Gábor", email = "[email protected]" }]
1822
requires-python = ">=3.7"
19-
dependencies = ["Sphinx>=5.3"]
20-
optional-dependencies.docs = ["furo>=2022.12.7", "sphinx>=6.1.3", "sphinx-autodoc-typehints>=1.23.4"]
23+
classifiers = [
24+
"Development Status :: 5 - Production/Stable",
25+
"Framework :: Sphinx :: Extension",
26+
"Intended Audience :: Developers",
27+
"License :: OSI Approved :: MIT License",
28+
"Programming Language :: Python",
29+
"Programming Language :: Python :: 3",
30+
"Programming Language :: Python :: 3 :: Only",
31+
"Topic :: Documentation :: Sphinx",
32+
]
33+
dynamic = [
34+
"version",
35+
]
36+
dependencies = [
37+
"Sphinx>=5.3",
38+
]
39+
optional-dependencies.docs = [
40+
"furo>=2022.12.7",
41+
"sphinx>=6.1.3",
42+
"sphinx-autodoc-typehints>=1.23.4",
43+
]
2144
optional-dependencies.testing = [
2245
"covdefaults>=2.2.2",
2346
"coverage>=7.2",
@@ -28,23 +51,29 @@ optional-dependencies.testing = [
2851
"sphobjinv>=2.3.1",
2952
"typing-extensions>=4.5",
3053
]
31-
optional-dependencies.type-comment = ['typed-ast>=1.5.4; python_version < "3.8"']
32-
dynamic = ["version"]
33-
classifiers = [
34-
"Development Status :: 5 - Production/Stable",
35-
"Framework :: Sphinx :: Extension",
36-
"Intended Audience :: Developers",
37-
"License :: OSI Approved :: MIT License",
38-
"Programming Language :: Python",
39-
"Programming Language :: Python :: 3",
40-
"Programming Language :: Python :: 3 :: Only",
41-
"Topic :: Documentation :: Sphinx",
54+
optional-dependencies.type-comment = [
55+
'typed-ast>=1.5.4; python_version < "3.8"',
4256
]
57+
urls.Changelog = "https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md"
58+
urls.Homepage = "https://github.com/tox-dev/sphinx-autodoc-typehints"
59+
urls.Source = "https://github.com/tox-dev/sphinx-autodoc-typehints"
60+
urls.Tracker = "https://github.com/tox-dev/sphinx-autodoc-typehints/issues"
4361

4462
[tool.hatch]
4563
build.hooks.vcs.version-file = "src/sphinx_autodoc_typehints/version.py"
4664
version.source = "vcs"
4765

66+
[tool.black]
67+
line-length = 120
68+
69+
[tool.isort]
70+
line_length = 120
71+
profile = "black"
72+
known_first_party = ["sphinx_autodoc_typehints", "tests"]
73+
74+
[tool.pytest.ini_options]
75+
testpaths = ["tests"]
76+
4877
[tool.coverage]
4978
html.show_contexts = true
5079
html.skip_covered = false
@@ -61,17 +90,6 @@ report.omit = []
6190
run.parallel = true
6291
run.plugins = ["covdefaults"]
6392

64-
[tool.black]
65-
line-length = 120
66-
67-
[tool.isort]
68-
line_length = 120
69-
profile = "black"
70-
known_first_party = ["sphinx_autodoc_typehints", "tests"]
71-
72-
[tool.pytest.ini_options]
73-
testpaths = ["tests"]
74-
7593
[tool.mypy]
7694
python_version = "3.10"
7795
strict = true

0 commit comments

Comments
 (0)