astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
20.02k stars 594 forks source link

Default indentation of dependencies in `pyproject.toml` #5852

Open my1e5 opened 1 month ago

my1e5 commented 1 month ago

While it is not explicitly stated, the PyPA guide to the pyproject.toml file uses two spaces for the default indentation of TOML arrays - see https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-and-requirements. uv is currently using four spaces.

I know that uv is able to respect the existing indentation level in the pyproject.toml file (see https://github.com/astral-sh/uv/issues/5009) which is nice.

Nevertheless, I wanted to pose this as an open question as to what the default setting should be.

(The same discussion from Rye - https://github.com/astral-sh/rye/issues/1078)

zanieb commented 1 month ago

I think it should be changed to two.