Skip to main content

Autoformatter for pyproject.toml files

Project description

pyproject-sort

Release version License Python version Supported platforms Code style: black Imports: isort Pipeline status

Autoformatter for pyproject.toml files.

Ensures pyproject.toml files are consistently formatted; preventing merge request conflicts, reducing time spent manually formatting; and maintaining a cleaner git history and readability.

Features

  • Alphabetically sorts pyproject.toml by parent section name

Installation

pyprojectsort is available via Test PyPI (via Platform Wheels):

pip install pyprojectsort

Examples

With the following pyproject.toml contained inside a directory:

[project]
name = "pyprojectsort"

[build-system]
build-backend = "flit.buildapi"
requires = ["flit"]

Run the package from within the directory of the pyproject toml file as follows:

pyprojectsort

pyprojectsort will reformat the pyproject.toml to the alphabetical order of the sections:

[build-system]
build-backend = "flit.buildapi"
requires = ["flit"]

[project]
name = "pyprojectsort"

License

pyprojectsort is licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyprojectsort-0.1.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

pyprojectsort-0.1.1-py2.py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page