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

Remove dead code #6097

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Remove dead code #6097

merged 1 commit into from
Apr 8, 2024

Conversation

dimbleby
Copy link
Contributor

I thought I'd have a go with https://pypi.org/project/vulture/

It reports rather a lot of false positives and I doubt that it's going to be worth the trouble of maintaining an allowlist and running this in pipelines: but as a one-off thing I reckon it did find a fair amount that can sensibly be removed - per this MR.

Less code = less bugs!

@ngnpope
Copy link

ngnpope commented Aug 1, 2022

This might also be useful: https://github.com/asottile/dead
Much fewer false positives.

@neersighted
Copy link
Member

I'm dubious on all code removed here being dead (e.g. I used some of the removed Env methods in #6458), but I'm all for trimming out cruft... I think in the medium term we need to start marking methods as internal or external more rigorously (such as in docstrings since _ prefixing is really not an indicator of private or public API status), or simply defined a poetry.api module that re-exports everything we intend to let outside consumers rely on.

@dimbleby
Copy link
Contributor Author

I'm dubious on all code removed here being dead

18 months later it all still is unused

@Secrus
Copy link
Member

Secrus commented Apr 8, 2024

@dimbleby if you could rebase the changes with the latest main, I will be happy to merge this

@Secrus Secrus enabled auto-merge (squash) April 8, 2024 13:12
@Secrus Secrus merged commit 925424a into python-poetry:main Apr 8, 2024
60 checks passed
@dimbleby dimbleby deleted the remove-dead-code branch April 8, 2024 13:28
Copy link

github-actions bot commented May 9, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants