tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.26k stars 108 forks source link

Support `taplo` configuration in `pyproject.toml` #603

Open bollwyvl opened 2 months ago

bollwyvl commented 2 months ago

elevator pitch

Enable configuring taplo by looking for the well-known pyproject.toml file and reading [tool.taplo].

references

motivation

As a (mostly) python user, I've applied taplo (via the conda-forge redistribution of taplo-cli (disclaimer: maintainer) in a number of workflows, but have mostly relied on the CLI flags to avoid Yet Another Config File.

With the (hopefully) pending python distributions on #549, more python users will have access to an easy-to-manage version of taplo, which they could include in e.g. [project.optional-depenendencies.lint].

Many python-based tools have centralized on pyproject.toml's reserved, but unconstrained, [tool] section for their configuration. Adopting this convention would improve the overall experience for python projects that might only be using taplo for that file, making an additional top-level .taplo.toml a bit "noisier" than it needs to be.

alternatives

design ideas

And thanks for taplo :hugs: !