Refactor with pyCharm from "user" to "self.user" Refactor with pyCharm from "user" to "self.user" python python

Refactor with pyCharm from "user" to "self.user"


What you are trying to do is not a simple rename, but creating a new instance attribute.As such, instead of using Rename you should use Extract > Field menu item.Alternatively you can access this refactoring as Ctrl+Alt+F (this depends on the shortcuts you have chosen. Mine is the default for KDE).