Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: set intermediate TOML tables to be super table #368

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

redeboer
Copy link
Member

The create_sub_table() function would sometimes result in a structure like the following. This is now fixed.

import tomlkit
from compwa_policy.utilities.pyproject import load_pyproject_toml
from compwa_policy.utilities.pyproject.setters import create_sub_table

pyproject = load_pyproject_toml("", modifiable=True)
pixi = create_sub_table(pyproject, "tool.pixi")
pixi["channels"] = ["conda-forge"]
toml_src = tomlkit.dumps(pyproject)
[tool]  # should be a super table
[tool.pixi]
channels = ["conda-forge"]

@redeboer redeboer added the 🐛 Bug Something isn't working label Aug 12, 2024
@redeboer redeboer added this to the 0.3.19 milestone Aug 12, 2024
@redeboer redeboer self-assigned this Aug 12, 2024
@redeboer redeboer enabled auto-merge (squash) August 12, 2024 07:06
@redeboer redeboer merged commit 21e5a77 into ComPWA:main Aug 12, 2024
18 checks passed
@redeboer redeboer deleted the fix-toml-creator branch August 12, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant