tox-dev / toml-fmt

Format Python TOML configurations.
MIT License
3 stars 1 forks source link

build requirement gets removed for no apparent reason #2

Open Dobatymo opened 1 week ago

Dobatymo commented 1 week ago

Discussed in https://github.com/tox-dev/pyproject-fmt/discussions/265

Hi, great project!

I have the following in my pyproject file

[build-system]
requires = [
  "cython==3.0.11",
  "numpy==1.22.2; python_version<'3.9'",
  "numpy>=2; python_version>='3.9'",
  "setuptools",
]

when running pyproject-fmt==2.2.4 using pre-commit the "numpy==1.22.2; python_version<'3.9'", line gets removed. It looks like a bug.

gaborbernat commented 1 week ago

It is, pull request welcome to fix it.