Skip to content

Remove dead code - #3774

Merged
frostming merged 5 commits into
pdm-project:mainfrom
duriantaco:remove-dead-code
Apr 30, 2026
Merged

frostming merged 5 commits into
pdm-project:mainfrom
duriantaco:remove-dead-code

Conversation

@duriantaco

Copy link
Copy Markdown
Contributor

Remove unused dead code identified by static analysis:

  • ProjectInfo.from_metadata().. not called (removes DYNAMIC constant and Any import too)
  • ExtrasWarning .. not raised
  • SilentSpinner.. not instantiated
  • exec_opts .. not referenced
  • InstallManager.NO_CACHE_PACKAGES.. never read
  • PySpecSet.MAX_MAJOR_VERSION.. never read
  • Version.MIN / Version.MAX .. declared but not used?
  • Project.DEPENDENCIES_RE.. never read

No tests needed.. This is only removal of unreachable code and nth else.

Dead code was identified by using Skylos and confirmed via manual verification.

Comment on lines -29 to -30
MIN: Version
MAX: Version

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

keep this

@duriantaco

Copy link
Copy Markdown
Contributor Author

Thanks for the heads up.. restored!

@codecov

codecov Bot commented Apr 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.22%. Comparing base (2a4351e) to head (16d70e4).
⚠️ Report is 44 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3774      +/-   ##
==========================================
+ Coverage   86.15%   86.22%   +0.06%     
==========================================
  Files         118      118              
  Lines       12427    12404      -23     
  Branches     2077     2076       -1     
==========================================
- Hits        10707    10695      -12     
+ Misses       1150     1139      -11     
  Partials      570      570              
Flag Coverage Δ
unittests 86.07% <100.00%> (+0.06%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frostming
frostming merged commit 41e77f2 into pdm-project:main Apr 30, 2026
65 of 67 checks passed
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.

2 participants