I have a class named Article
in my project. I want to find all its methods that are unused in the project. For a particular method I can press Alt+F7
PyCharm doesn't offer this feature since it isn't possible to reliably determine that a method is unused, because there are simply too many ways to call it dynamically.
But you may use Vulture to find most of dead code in a project. Refer to the following commands:
$ pip install -U vulture
$ vulture path_of_project
$ # Use --exclude for excluding particular files (e.g. virtualenv files)
$ vulture --exclude=env path_of_project