Python refactoring helper
A tool for easy refactoring. It was originally written to find all division and rounding cases for python 2 -> 3 transition, but can be useful for other refactoring tasks.
How the tool works:
- It finds all python-files in some path (usually, your project)
- Parses each file as AST
- Finds all cases for current task in AST
- Makes html-report with all using cases, then opens it in browser
- By click on each link you can open this file in IntelliJ idea at current linenumber
Installing:
git clone https://github.com/vera-l/python-refhelper.git
cd python-refhelper
python3 setup.py install --user
Using:
pyrefhelper [path] [task=list|division|rounding|callback]
Available tasks:
list
- get all python filesdivision
- find division cases in all python filesrounding
- find rounding cases in all python filescallback
- find tornado callback cases in all python filesyour_task
- you can add own tasks