void (@NotNull PsiElement element, @NotNull String newName, @NotNull Map<PsiElement, String> allRenames) { final PyFunction function = (PyFunction)element; PyOverridingMethodsSearch .search(function, true) .forEach( f -> { allRenames.put(f, newName); return true; } ); PyiUtil .getOverloads(function, TypeEvalContext.codeInsightFallback(element.getProject())) .forEach(overload -> allRenames.put(overload, newName)); final PsiElement originalElement = PyiUtil.getOriginalElement(function); if (originalElement != null) { allRenames.put(originalElement, newName); } final PsiElement stubElement = PyiUtil.getPythonStub(function); if (stubElement != null) { allRenames.put(stubElement, newName); } final PyClass containingClass = function.getContainingClass(); if (containingClass != null) { final Property property = containingClass.findPropertyByCallable(function); if (property != null) { addRename(allRenames, newName, property.getGetter()); addRename(allRenames, newName, property.getSetter()); addRename(allRenames, newName, property.getDeleter()); } } }