tox-dev / pyproject-fmt

MIT License
167 stars 27 forks source link

File with multiple poetry sources is not configured correctly #248

Closed nurbscoder closed 1 month ago

nurbscoder commented 1 month ago

A pyproject.toml with the following content:

...
[[tool.poetry.source]]
name = "mysource"
url = "https://mysource.com/api/v4/projects/1/packages/pypi/simple"
priority = "supplemental"

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
...

gets formatted to

...
[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

priority = "supplemental"
...

This breaks the use of poetry with custom sources (https://python-poetry.org/docs/repositories/#private-repository-example)

I am using pyproject-fmt (2.2.1).

nurbscoder commented 1 month ago

Sorry, I messed with the versions. It was an issue with an older version. It is working with 2.2.1.