In Pycharm one can easily rename a variable project wide using the (shift + F6) key to refactor-rename a variable
But it is unable to do this inside a function.
A workaround would be to use search-replace, But as I've gotten used to refactor-renaming i would like to find a way to refactor-rename inside a function.
Thanks for reading
PyCharm recognizes the limited scope of the variable (inside the function) and refactoring behaves slightly different in this case - the usual refactoring dialogue no longer opens up.
The green background (in your example, the actual colour may differ depending on the color scheme and customisations) for all the variable's instances inside the function indicates pycharm is in this local refactoring mode. Just edit the variable name and you'll see all the variable instances being modified simultaneously. Press Enter when done and the green background disappears indicating that the local refactoring mode ended.