Skip to content

Commit 69de0b6

Browse files
[pre-commit] Add pyproject-fmt to normalize the pyproject.toml (#846)
1 parent c2181e4 commit 69de0b6

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ repos:
55
- id: black
66
args: [--safe, --quiet, --line-length=88]
77

8+
- repo: https://github.com/tox-dev/pyproject-fmt
9+
rev: "v2.5.0"
10+
hooks:
11+
- id: pyproject-fmt
12+
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
13+
additional_dependencies: ["tox>=4.9"]
14+
815
- repo: https://github.com/asottile/blacken-docs
916
rev: 1.19.1
1017
hooks:

pyproject.toml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,27 @@ requires = [
99
name = "pytest-html"
1010
description = "pytest plugin for generating HTML reports"
1111
readme = "README.rst"
12-
license = "MPL-2.0"
13-
requires-python = ">=3.9"
1412
keywords = [
15-
"pytest",
1613
"html",
14+
"pytest",
1715
"report",
1816
]
17+
license = "MPL-2.0"
1918
authors = [
20-
{ name = "Dave Hunt", email = "[email protected]" },
19+
{ name = "Dave Hunt", email = "[email protected]" },
2120
{ name = "Jim Brannlund", email = "[email protected]" },
2221
]
22+
requires-python = ">=3.9"
2323
classifiers = [
2424
"Development Status :: 5 - Production/Stable",
2525
"Framework :: Pytest",
2626
"Intended Audience :: Developers",
2727
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
2828
"Natural Language :: English",
29-
"Operating System :: POSIX",
30-
"Operating System :: Microsoft :: Windows",
3129
"Operating System :: MacOS :: MacOS X",
30+
"Operating System :: Microsoft :: Windows",
31+
"Operating System :: POSIX",
32+
"Programming Language :: Python :: 3 :: Only",
3233
"Programming Language :: Python :: 3.9",
3334
"Programming Language :: Python :: 3.10",
3435
"Programming Language :: Python :: 3.11",
@@ -40,40 +41,35 @@ classifiers = [
4041
"Topic :: Software Development :: Testing",
4142
"Topic :: Utilities",
4243
]
43-
dependencies = [
44-
"pytest>=7.0.0",
45-
"pytest-metadata>=2.0.0",
46-
"Jinja2>=3.0.0",
47-
]
4844
dynamic = [
4945
"version",
5046
]
5147

52-
[project.optional-dependencies]
53-
docs = [
54-
"pip-tools>=6.13.0",
48+
dependencies = [
49+
"jinja2>=3",
50+
"pytest>=7",
51+
"pytest-metadata>=2",
52+
]
53+
optional-dependencies.docs = [
54+
"pip-tools>=6.13",
5555
]
56-
test = [
56+
optional-dependencies.test = [
5757
"assertpy>=1.1",
5858
"beautifulsoup4>=4.11.1",
59-
"black>=22.1.0",
59+
"black>=22.1",
6060
"flake8>=4.0.1",
61-
"pre-commit>=2.17.0",
62-
"pytest-xdist>=2.4.0",
63-
"pytest-mock>=3.7.0",
61+
"pre-commit>=2.17",
62+
"pytest-mock>=3.7",
6463
"pytest-rerunfailures>=11.1.2",
65-
"selenium>=4.3.0",
64+
"pytest-xdist>=2.4",
65+
"selenium>=4.3",
6666
"tox>=3.24.5",
6767
]
68-
69-
[project.urls]
70-
Homepage = "https://github.com/pytest-dev/pytest-html"
71-
Tracker = "https://github.com/pytest-dev/pytest-html/issues"
72-
Source = "https://github.com/pytest-dev/pytest-html"
73-
74-
[project.entry-points.pytest11]
75-
html = "pytest_html.plugin"
76-
html_fixtures = "pytest_html.fixtures"
68+
urls.Homepage = "https://github.com/pytest-dev/pytest-html"
69+
urls.Source = "https://github.com/pytest-dev/pytest-html"
70+
urls.Tracker = "https://github.com/pytest-dev/pytest-html/issues"
71+
entry-points.pytest11.html = "pytest_html.plugin"
72+
entry-points.pytest11.html_fixtures = "pytest_html.fixtures"
7773

7874
[tool.hatch.envs.test]
7975
features = [

0 commit comments

Comments
 (0)