Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python tool that suggests refactorings

Tags:

People also ask

What is a refractor Python?

Refactoring in Python. Refactoring is the technique of changing an application (either the code or the architecture) so that it behaves the same way on the outside, but internally has improved. These improvements can be stability, performance, or reduction in complexity.

What is code refactoring in Python?

What is Code Refactoring? Refactoring means organizing your code without modifying its original functionality. Refactoring is the process of making small changes or adjustments to your code without affecting or changing how the code functions while in use.

What is sourcery Python?

Sourcery is an AI-powered coding assistant which helps you write better Python code faster. It works by providing refactoring suggestions on the fly that you can instantly integrate into your code. Immediately improve your code quality with suggestions and fixes. Get real time feedback on code quality.

What is rope in Python?

Rope is the world's most advanced open source Python refactoring library (yes, I totally stole that tagline from Postgres). Most Python syntax from Python 2.7 up to Python 3.10 is supported. Please file bugs and contribute patches if you encounter gaps.


When digging into legacy Python code and writing Python code myself, I often use pylint. I'm also using Clone Digger. I've recently started to use rope, which is a library for automated refactoring.

But I'm looking for something else than rope. I would prefer a tool that just makes suggestions about possible refactorings: names the refactoring, optionally provides a short description of it (great for learning purposes), highlights the code section and lets me do the refactoring myself. Is there such a tool?