giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.11k stars 1.37k forks source link

Add toml-sort linting tool for pyproject.toml #2311

Closed giampaolo closed 9 months ago

giampaolo commented 9 months ago

This is similar to black CLI tool but for pyproject.toml. This tool applies some style constraints to pyproject.toml. E.g. it makes sure arrays are indented with 4 spaces, inline comments are followed by 2 spaces, etc. Also (most importantly) it automatically sorts array keys.