astral-sh/uv

Default indentation of dependencies in `pyproject.toml`

Open

#5,852 opened on Aug 7, 2024

View on GitHub
 (4 comments) (11 reactions) (0 assignees)Rust (3,111 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (84,934 stars)
PR merge metrics
 (Avg merge 7d 16h) (259 merged PRs in 30d)

Description

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)

Contributor guide