Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions pymode/rope.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,15 +465,19 @@ def run(self):
if not input_str:
return False

changes = self.get_changes(refactor, input_str)

action = env.user_input_choices(
'Choose what to do:', 'perform', 'preview')
'Choose what to do:', 'perform', 'preview',
'perform in class hierarchy',
'preview in class hierarchy')

in_hierarchy = action.endswith("in class hierarchy")

changes = self.get_changes(refactor, input_str, in_hierarchy)

if not action:
return False

if action == 'preview':
if action.startswith('preview'):
print("\n ")
print("-------------------------------")
print("\n%s\n" % changes.get_description())
Expand Down Expand Up @@ -505,15 +509,15 @@ def get_input_str(refactor, ctx):
return True

@staticmethod
def get_changes(refactor, input_str):
def get_changes(refactor, input_str, in_hierarchy=False):
""" Get changes.

:return Changes:

"""
progress = ProgressHandler('Calculate changes ...')
return refactor.get_changes(
input_str, task_handle=progress.handle)
input_str, task_handle=progress.handle, in_hierarchy = in_hierarchy)


class RenameRefactoring(Refactoring):
Expand Down