From b58c074eddda05a669d60755385a49a6e0717146 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 27 Apr 2024 14:39:23 +0300 Subject: [PATCH] Format and validate pyproject.toml (#153) --- .pre-commit-config.yaml | 10 ++++ pyproject.toml | 100 ++++++++++++++++++++-------------------- 2 files changed, 60 insertions(+), 50 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c941efb..7554cf6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,13 @@ repos: - id: end-of-file-fixer - id: forbid-new-submodules - id: trailing-whitespace + + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.7.0 + hooks: + - id: pyproject-fmt + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.16 + hooks: + - id: validate-pyproject diff --git a/pyproject.toml b/pyproject.toml index eb43da8..36ba6b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,69 +1,66 @@ [build-system] -requires = ["flit_core>=3.7"] build-backend = "flit_core.buildapi" +requires = [ + "flit_core>=3.7", +] -# project metadata [project] name = "sphinx-autobuild" description = "Rebuild Sphinx documentation on changes, with hot reloading in the browser." readme = "README.rst" -urls.Changelog = "https://github.com/sphinx-doc/sphinx-autobuild/blob/main/NEWS.rst" -urls.Documentation = "https://github.com/sphinx-doc/sphinx-autobuild#readme" -urls.Download = "https://pypi.org/project/sphinx-autobuild/" -urls."Issue tracker" = "https://github.com/sphinx-doc/sphinx-autobuild/issues" -urls.Source = "https://github.com/sphinx-doc/sphinx-autobuild" license.text = "MIT" +authors = [ + {name = "Adam Turner"}, + {name = "Jonathan Stoppani", email = "jonathan@stoppani.name"}, +] requires-python = ">=3.9" - -# Classifiers list: https://pypi.org/classifiers/ classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Environment :: Web Environment", - "Framework :: Sphinx", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Documentation", - "Topic :: Documentation :: Sphinx", - "Topic :: Software Development", - "Topic :: Software Development :: Documentation", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Environment :: Web Environment", + "Framework :: Sphinx", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", + "Topic :: Software Development", + "Topic :: Software Development :: Documentation", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities", +] +dynamic = [ + "version", ] dependencies = [ - "colorama", - "sphinx", - "starlette>=0.35", - "uvicorn>=0.25", - "watchfiles>=0.20", - "websockets>=11", + "colorama", + "sphinx", + "starlette>=0.35", + "uvicorn>=0.25", + "watchfiles>=0.20", + "websockets>=11", ] -dynamic = ["version"] - [project.optional-dependencies] -docs = [] +docs = [ +] test = [ - "pytest>=6", + "pytest>=6", ] - -[[project.authors]] -name = "Adam Turner" - -[[project.authors]] -name = "Jonathan Stoppani" -email = "jonathan@stoppani.name" - +[project.urls] +Changelog = "https://github.com/sphinx-doc/sphinx-autobuild/blob/main/NEWS.rst" +Documentation = "https://github.com/sphinx-doc/sphinx-autobuild#readme" +Download = "https://pypi.org/project/sphinx-autobuild/" +"Issue tracker" = "https://github.com/sphinx-doc/sphinx-autobuild/issues" +Source = "https://github.com/sphinx-doc/sphinx-autobuild" [project.scripts] sphinx-autobuild = "sphinx_autobuild.__main__:main" @@ -76,3 +73,6 @@ include = [ "tests/", "noxfile.py", ] + +[tool.pyproject-fmt] +max_supported_python = "3.13"