diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 506b2deff..ee93dd39e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 42f3c1b64..1e9ee45eb 100644 --- a/pyproject.toml +++ b/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", @@ -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 @@ -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"