astral-sh/uv

Default indentation of dependencies in `pyproject.toml`

Open

#5852 aperta il 7 ago 2024

Vedi su GitHub
 (4 commenti) (11 reazioni) (0 assegnatari)Rust (3111 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (84.934 star)
Metriche merge PR
 (Merge medio 7g 16h) (259 PR mergiate in 30 g)

Descrizione

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)

Guida contributor