rye icon indicating copy to clipboard operation
rye copied to clipboard

Two spaces for indentation level of pyproject.toml

Open my1e5 opened this issue 9 months ago • 2 comments

Currently rye uses 4 spaces for indentation levels when working with pyproject.toml.

While it is not explicitly stated, the examples in the official TOML specification use two spaces for indentation levels.

See https://toml.io/en/v1.0.0#array imageimage

Many popular TOML formatting tools also use 2 spaces for their default indentation value.

image

image

Would rye be open to setting two spaces as the default indentation? Or perhaps making it configurable?

my1e5 avatar May 13 '24 14:05 my1e5

I'm open to it but I'm not sure what the pyproject.toml recommendations are.

mitsuhiko avatar Jul 23 '24 20:07 mitsuhiko

I don't see a specific recommendation, but they do use two spaces in the docs https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

zanieb avatar Jul 23 '24 20:07 zanieb