Skip to content

Comments

fix(factory): unwrap config to not end up with tomlkit instances#445

Closed
mkniewallner wants to merge 1 commit intopython-poetry:mainfrom
mkniewallner:fix/unwrap-toml-config
Closed

fix(factory): unwrap config to not end up with tomlkit instances#445
mkniewallner wants to merge 1 commit intopython-poetry:mainfrom
mkniewallner:fix/unwrap-toml-config

Conversation

@mkniewallner
Copy link
Member

@mkniewallner mkniewallner commented Aug 20, 2022

Resolves python-poetry/poetry/issues/6201.

  • Added tests for changed code.
  • Updated documentation for changed code.

WIP for now, since we need to measure the impacts of this change, and this is missing tests.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mkniewallner mkniewallner changed the title [WIP] fix(factory): unwrap config to not end up with tomlkit instances fix(factory): unwrap config to not end up with tomlkit instances Sep 19, 2022
@Kurt-von-Laven
Copy link

@mkniewallner, can you enlighten me as to why unwrapping the config would ultimately prevent the extra indentation from appearing in our poetry.lock files?

@neersighted
Copy link
Member

Because the subclass of dict otherwise used implies indentation in the output, as Tomlkit's explicit mission is to be both format-preserving and format-controlling. A type that implies indentation is getting improperly leaked back into the output.

If you'd like to learn more about the architecture of Poetry/poetry-core/Cleo/Tomlkit, I suggest reaching out via Discord 😄

@Secrus
Copy link
Member

Secrus commented Apr 17, 2023

Closing, since #483 was merged and we no longer use tomlkit in poetry-core

@Secrus Secrus closed this Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Indentation in Lock File

4 participants