Skip to content

Commit

Permalink
fix: wrong nested table level when overwriting pyproject (#6512)
Browse files Browse the repository at this point in the history
Previously, we rely on the `display_name` stored with `tomlkit.Table`,
which is an internal implementation detail, and it breaks
python-poetry/tomlkit#234. This PR corrects the
nested table level, because `preserved` map comes from the poetry config
table.

(cherry picked from commit 20352b6)
  • Loading branch information
frostming authored and radoering committed Sep 16, 2022
1 parent f6cce31 commit fc4bc0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/console/commands/self/self_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def generate_system_pyproject(self) -> None:
content = Factory.create_pyproject_from_package(package=package)

for key in preserved:
content[key] = preserved[key]
content["tool"]["poetry"][key] = preserved[key] # type: ignore[index]

self.system_pyproject.write_text(content.as_string(), encoding="utf-8")

Expand Down

0 comments on commit fc4bc0c

Please sign in to comment.