Skip to content

Commit dbb8015

Browse files
authored
Validate and format pyproject.toml (#1700)
* Fix and validate pyproject.toml * Format pyproject.toml with pyproject-fmt * Sort [tool] sections alphabetically
1 parent 602f475 commit dbb8015

File tree

2 files changed

+40
-27
lines changed

2 files changed

+40
-27
lines changed

.pre-commit-config.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v4.3.0
44
hooks:
5+
- id: check-toml
56
- id: check-yaml
67
- id: end-of-file-fixer
78
- id: trailing-whitespace
@@ -58,3 +59,11 @@ repos:
5859
- id: black
5960
language_version: python3
6061
entry: black --target-version=py37
62+
- repo: https://github.com/tox-dev/pyproject-fmt
63+
rev: 0.3.5
64+
hooks:
65+
- id: pyproject-fmt
66+
- repo: https://github.com/abravalheri/validate-pyproject
67+
rev: v0.10.1
68+
hooks:
69+
- id: validate-pyproject

pyproject.toml

+31-27
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
[build-system]
2-
requires = ["hatchling"]
32
build-backend = "hatchling.build"
3+
requires = [
4+
"hatchling",
5+
]
46

57
[project]
6-
name = "django-debug-toolbar"
7-
dynamic = ["version"]
8+
name = "django_debug_toolbar"
89
description = "A configurable set of panels that display various debug information about the current request/response."
910
readme = "README.rst"
10-
license = "BSD-3-Clause"
11-
requires-python = ">=3.7"
11+
license = {text = "BSD-3-Clause"}
1212
authors = [
1313
{ name = "Rob Hudson", email = "[email protected]" },
1414
]
15+
requires-python = ">=3.7"
16+
dependencies = [
17+
"Django>=3.2.4",
18+
"sqlparse>=0.2",
19+
]
20+
dynamic = [
21+
"version",
22+
]
1523
classifiers = [
1624
"Development Status :: 5 - Production/Stable",
1725
"Environment :: Web Environment",
@@ -31,30 +39,14 @@ classifiers = [
3139
"Programming Language :: Python :: 3.10",
3240
"Topic :: Software Development :: Libraries :: Python Modules",
3341
]
34-
dependencies = [
35-
"Django >= 3.2.4",
36-
"sqlparse >= 0.2.0",
37-
]
38-
3942
[project.urls]
4043
Download = "https://pypi.org/project/django-debug-toolbar/"
4144
Homepage = "https://github.com/jazzband/django-debug-toolbar"
4245

43-
[tool.hatch.version]
44-
path = "debug_toolbar/__init__.py"
45-
46-
[tool.hatch.build.targets.wheel]
47-
packages = ["debug_toolbar"]
4846

49-
[tool.hatch.build.targets.sdist]
50-
include = [
51-
"/debug_toolbar",
52-
"/CONTRIBUTING.md",
53-
]
54-
55-
[tool.isort]
56-
combine_as_imports = true
57-
profile = "black"
47+
[tool.coverage.html]
48+
skip_covered = true
49+
skip_empty = true
5850

5951
[tool.coverage.run]
6052
branch = true
@@ -69,6 +61,18 @@ source = ["src", ".tox/*/site-packages"]
6961
fail_under = 93
7062
show_missing = true
7163

72-
[tool.coverage.html]
73-
skip_covered = true
74-
skip_empty = true
64+
[tool.hatch.build.targets.sdist]
65+
include = [
66+
"/debug_toolbar",
67+
"/CONTRIBUTING.md",
68+
]
69+
70+
[tool.hatch.build.targets.wheel]
71+
packages = ["debug_toolbar"]
72+
73+
[tool.hatch.version]
74+
path = "debug_toolbar/__init__.py"
75+
76+
[tool.isort]
77+
combine_as_imports = true
78+
profile = "black"

0 commit comments

Comments
 (0)