the following except from a pyproject.toml will be reformatted to the follow on example which when then passed into ruff the tool complains is invalid (errors provided). The expected behavior would be to leave them in the embedded sub-section or allow an option to say these specific sections must stay a "map" (example input option at the very bottom)
then in this case anything defined as tool.ruff or its subsections would keep the map while still allowing the flattening of maps -> sequences of others.
the following except from a
pyproject.toml
will be reformatted to the follow on example which when then passed into ruff the tool complains is invalid (errors provided). The expected behavior would be to leave them in the embedded sub-section or allow an option to say these specific sections must stay a "map" (example input option at the very bottom)Is converted to this by
pyproject-fmt
:When the updated pyproject is then used by ruff (during pre-commit) I get the following errors:
How I have
pyproject-fmt
configured:Possible configuration option:
then in this case anything defined as
tool.ruff
or its subsections would keep the map while still allowing the flattening of maps -> sequences of others.