Refactoring can be frustrating.
As I read through code I often rewrite it as I go, I find this helps me to understand it better. A bit like how doodling has been shown to help people remember stuff. I also take notes as extra comments as I go. Often after having gone through a bag of code I find that some of the edits I have made improve it. Ideally I could just create a new branch, merge request, go through the process and eventually get that code merged. One issue that comes up, and comes up particularly often on large refactor work is conflicts and conflict management. Now pycharm has a great ability to resolve a lot of conflicts but if the refactor is large enough to be moving whole collections of modules to a new architecture then simple side by side comparison of the changes doesn’t work. It can sometimes be hard to see how to integrate the new work. Alongside this is the fact that for large architecture sized refactor projects the process to get merge approval can take a long