How to “Automate Reconstruction” of Code
For example, how to modify the code’s method name and its call?
#! /usr/bin/env python def test(): test = 'test()' print test[:-2] test()
1. IDE generally has such functions. What we want here is to complete batch operations automatically.
2. methods such as regularization are not considered here, for example, strings with the same name in the code can be easily replaced.
3. The practice of the subject is to use python-rope [https://github.com/python-rope/rope ]
To refactor, but only find ways to modify variables. Have you provided any experience with methods or other similar tools?
4. Tools that are not necessarily limited to python to refactor other languages can also be shared.
5. The “automated refactoring” here means that I do not need to do it manually. When I write the refactoring rules, I can refactor some projects in batches. It is similar to python-rope.