poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Remove dead code

Open dimbleby opened this issue 2 years ago • 2 comments

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!

dimbleby avatar Jul 30 '22 21:07 dimbleby

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

ngnpope avatar Aug 01 '22 10:08 ngnpope

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.

neersighted avatar Sep 18 '22 17:09 neersighted

I'm dubious on all code removed here being dead

18 months later it all still is unused

dimbleby avatar Mar 29 '24 20:03 dimbleby

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

Secrus avatar Apr 08 '24 13:04 Secrus