PyOrphan suggest unused code in your python project as target to be removed.
Be careful, take in consideration that python is a dynamic language, and this tool can show false positives.
We suggest use pyorphan as pylint complement.
-
Clone project:
git clone git@github.com:estevopaz/pyorphan.git
-
System installation (as root):
cd pyorphan ./setup.py install
Note: If you want modify code use:
./setup.py develop
usage: pyorphan [-h] project_path [file_path]
Orphan python code checker.
positional arguments:
project_path Project path
file_path Tarjet file if required
optional arguments:
-h, --help show this help message and exit
This is a little but useful project to imporove code quality.
Any kind of contribution to the project will be welcome.
-
Prevent false positives for Flask routes:
@APP.route('/login', methods=('GET', 'POST'))
-
Support --except parameter.
-
Look for unused global variables (not supported by pylint).
-
Allow --context like grep.
-
Support for GNU/Linux Debian package.