You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lintLabel for features that we would implement as lint rules, not core type checker featuresunreachable-codewishNot on the current roadmap; maybe in the future
vulture does a decent job at this. clippy does an amazing job at this.
We don't want to emit this for 'public' methods. I don't know if we just want to check __all__, or if we want to be more lenient, personally I think an option to say I don't want to export anything, so the rule is very pedantic would be great, and the other side of that is maybe only complaining about 'private' (prefixed with '_') methods that are unused.
Reacted by Alex Waygood, T-256, Robert Henzel, Sergey Filimonov, Dae, Ellis Breen and amnesia
This is different from Gray out unreachable code #784 in that it zooms out and looks across functions, even at the entire project. E.g., are there functions that are never called?
A big challenge with this at the module level is that Python lack's visibility modifier. Especially if the project is a library with external consumers. We also need to consider re-exports.
lintLabel for features that we would implement as lint rules, not core type checker featuresunreachable-codewishNot on the current roadmap; maybe in the future
Activity
[-]Add `dead-code` warning diagnostics[/-][+]Dead code detection[/+]MichaReiser commentedon Mar 4, 2026
Just writing down some of my thoughts: