Issue
codespell fails to parse pyproject.toml with TOML array of tables syntax [[...]] (e.g. multiple sections of [[tool.uv.index]]) and throws an error indicating the section "already exists".
Using latest codespell release 2.4.1.
Steps to Reproduce
- Create a
pyproject.toml with multiple entries using TOML array of tables syntax, for example:
[[tool.uv.index]]
name = "custom-index"
url = "https://example.com/simple/"
explicit = true
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
- Run codespell
Expected Behavior
codespell should correctly parse the TOML array of tables syntax [[...]] as defined in the [TOML specification]. Multiple [[section]] entries are valid TOML and represent an array of tables.
This syntax is commonly used by modern Python tooling like [uv] for defining multiple package indexes. The TOML file is valid and works correctly with other tools (uv, pip, ruff, etc.).
Issue
codespell fails to parse
pyproject.tomlwith TOML array of tables syntax[[...]](e.g. multiple sections of[[tool.uv.index]]) and throws an error indicating the section "already exists".Using latest codespell release
2.4.1.Steps to Reproduce
pyproject.tomlwith multiple entries using TOML array of tables syntax, for example:Expected Behavior
codespell should correctly parse the TOML array of tables syntax
[[...]]as defined in the [TOML specification]. Multiple [[section]] entries are valid TOML and represent an array of tables.This syntax is commonly used by modern Python tooling like [uv] for defining multiple package indexes. The TOML file is valid and works correctly with other tools (uv, pip, ruff, etc.).