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: package-type fixer to avoid duplicated empty section #2578

Merged
merged 8 commits into from
Jan 22, 2024

Conversation

wey-gu
Copy link
Contributor

@wey-gu wey-gu commented Jan 21, 2024

close: #2577

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

This seems to be a tomlkit issue, the workaround(instead of fixing upstream) here is to pop the parent section and write back the whole.

@wey-gu wey-gu marked this pull request as ready for review January 21, 2024 03:48
@wey-gu wey-gu changed the title fix: packagetype fixer avoid dupl. empty section fix: package-type fixer to avoid duplicated empty section Jan 21, 2024
@frostming
Copy link
Collaborator

thanks for the fix. I will review it tomorrow

Copy link
Collaborator

@frostming frostming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though a bit ugly, modifying a TOML while keeping the styles and orders are hard.

@wey-gu
Copy link
Contributor Author

wey-gu commented Jan 22, 2024

Opps, sorry for my silly typo

@wey-gu
Copy link
Contributor Author

wey-gu commented Jan 22, 2024

I will test it locally and maybe put the lock file in the test project.

@wey-gu wey-gu requested a review from frostming January 22, 2024 01:42
@wey-gu wey-gu requested a review from frostming January 22, 2024 02:17
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (348b79c) 84.76% compared to head (15e3a2b) 84.79%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2578      +/-   ##
==========================================
+ Coverage   84.76%   84.79%   +0.02%     
==========================================
  Files         104      104              
  Lines       10387    10387              
  Branches     2272     2272              
==========================================
+ Hits         8805     8808       +3     
+ Misses       1106     1105       -1     
+ Partials      476      474       -2     
Flag Coverage Δ
unittests 84.58% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frostming frostming merged commit 1c5bd6a into pdm-project:main Jan 22, 2024
21 checks passed
@wey-gu wey-gu deleted the fix_fixer branch January 22, 2024 03:11
@j178 j178 mentioned this pull request Apr 3, 2024
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.

package-type fixer won't update toml properly for "Nested Section Ordering Issue in TOML"
2 participants