News for hackers. Stuff that matters.
Re:Vulture: Find Dead Python Code by bottled_poe on Wednesday May 05, 2021 @07:36PM (#27057304)
I feel unit test coverage is a better approach to this problem.
Re:Vulture: Find Dead Python Code by p1necone on Wednesday May 05, 2021 @09:06PM (#27057979)
This doesn't really help. I've found plenty of code before that isn't marked by the IDE/linters as unused because it's called by a unit test, but nothing else.
Re:Vulture: Find Dead Python Code by jimmaswell on Wednesday May 05, 2021 @07:52PM (#27057418)
A unit test covering code doesn't mean the code is actually used, and some code isn't feasible to cover in unit tests.
Re:Vulture: Find Dead Python Code by long11l on Wednesday May 05, 2021 @11:03PM (#27058719)
Well atleast the code will be used then. Fingers crossed it already has a unit test, so once the dead code is remove the test can be too
Re:Vulture: Find Dead Python Code by nxpnsv on Thursday May 06, 2021 @01:38AM (#27059531)
If I have tests for everything coverage is 100% regardless of whether the functions are used or not