Skip to content

Commit

Permalink
Validate and format pyproject.toml (#1700)
Browse files Browse the repository at this point in the history
* Fix and validate pyproject.toml
* Format pyproject.toml with pyproject-fmt
* Sort [tool] sections alphabetically
  • Loading branch information
hugovk committed Nov 3, 2022
1 parent 602f475 commit dbb8015
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -2,6 +2,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down Expand Up @@ -58,3 +59,11 @@ repos:
- id: black
language_version: python3
entry: black --target-version=py37
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.3.5
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
hooks:
- id: validate-pyproject
58 changes: 31 additions & 27 deletions pyproject.toml
@@ -1,17 +1,25 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = [
"hatchling",
]

[project]
name = "django-debug-toolbar"
dynamic = ["version"]
name = "django_debug_toolbar"
description = "A configurable set of panels that display various debug information about the current request/response."
readme = "README.rst"
license = "BSD-3-Clause"
requires-python = ">=3.7"
license = {text = "BSD-3-Clause"}
authors = [
{ name = "Rob Hudson", email = "rob@cogit8.org" },
]
requires-python = ">=3.7"
dependencies = [
"Django>=3.2.4",
"sqlparse>=0.2",
]
dynamic = [
"version",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
Expand All @@ -31,30 +39,14 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"Django >= 3.2.4",
"sqlparse >= 0.2.0",
]

[project.urls]
Download = "https://pypi.org/project/django-debug-toolbar/"
Homepage = "https://github.com/jazzband/django-debug-toolbar"

[tool.hatch.version]
path = "debug_toolbar/__init__.py"

[tool.hatch.build.targets.wheel]
packages = ["debug_toolbar"]

[tool.hatch.build.targets.sdist]
include = [
"/debug_toolbar",
"/CONTRIBUTING.md",
]

[tool.isort]
combine_as_imports = true
profile = "black"
[tool.coverage.html]
skip_covered = true
skip_empty = true

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

[tool.coverage.html]
skip_covered = true
skip_empty = true
[tool.hatch.build.targets.sdist]
include = [
"/debug_toolbar",
"/CONTRIBUTING.md",
]

[tool.hatch.build.targets.wheel]
packages = ["debug_toolbar"]

[tool.hatch.version]
path = "debug_toolbar/__init__.py"

[tool.isort]
combine_as_imports = true
profile = "black"

0 comments on commit dbb8015

Please sign in to comment.