pypa / flit

Simplified packaging of Python modules
https://flit.pypa.io/
BSD 3-Clause "New" or "Revised" License
2.16k stars 134 forks source link

flit init does not respect existing pyproject.toml #351

Open Yura52 opened 4 years ago

Yura52 commented 4 years ago

Hi! I already have pyproject.toml (for Black) and there are no options to make flit init append content instead of rewriting the file. It is easy to bypass this limitation, but anyway, it may worth fixing.

flit==2.3.0

takluyver commented 4 years ago

Yes, good point. That was originally written to create a flit-specific flit.ini file, and when I swapped over to pyproject.toml, basically no-one had the file already, so it was easy to create it from scratch. Now there are lots of projects using pyproject.toml.

tomlkit may well be useful for this - it's meant to allow a program to modify TOML without losing comments & formatting.