Skip to content

Commit 2ad7970

Browse files
committed
merge
2 parents 08ec591 + 9190132 commit 2ad7970

File tree

2 files changed

+17
-37
lines changed

2 files changed

+17
-37
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Contributors:
1616
* Daniel Hahler (http://github.com/blueyed)
1717
* David Vogt (http://github.com/winged);
1818
* Denis Kasak (http://github.com/dkasak);
19+
* Dimitrios Semitsoglou-Tsiapos (https://github.com/dset0x)
1920
* Dirk Wallenstein (http://github.com/dirkwallenstein);
2021
* Florent Xicluna (http://github.com/florentx);
2122
* Fredrik Henrysson (http://github.com/fhenrysson);

pymode/rope.py

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -502,14 +502,7 @@ def get_input_str(refactor, ctx):
502502

503503
@staticmethod
504504
def get_changes(refactor, input_str, in_hierarchy=False):
505-
""" Get changes.
506-
507-
:return Changes:
508-
509-
"""
510-
progress = ProgressHandler('Calculate changes ...')
511-
return refactor.get_changes(
512-
input_str, task_handle=progress.handle, in_hierarchy=in_hierarchy)
505+
return refactor.get_changes(input_str)
513506

514507

515508
class RenameRefactoring(Refactoring):
@@ -547,6 +540,15 @@ def get_input_str(self, refactor, ctx):
547540

548541
return newname
549542

543+
@staticmethod
544+
def get_changes(refactor, input_str, in_hierarchy=False):
545+
""" Get changes.
546+
547+
:return Changes:
548+
549+
"""
550+
return refactor.get_changes(input_str, in_hierarchy=in_hierarchy)
551+
550552

551553
class ExtractMethodRefactoring(Refactoring):
552554

@@ -571,16 +573,6 @@ def get_refactor(ctx):
571573
return extract.ExtractMethod(
572574
ctx.project, ctx.resource, offset1, offset2)
573575

574-
@staticmethod
575-
def get_changes(refactor, input_str):
576-
""" Get changes.
577-
578-
:return Changes:
579-
580-
"""
581-
582-
return refactor.get_changes(input_str)
583-
584576

585577
class ExtractVariableRefactoring(Refactoring):
586578

@@ -605,16 +597,6 @@ def get_refactor(ctx):
605597
return extract.ExtractVariable(
606598
ctx.project, ctx.resource, offset1, offset2)
607599

608-
@staticmethod
609-
def get_changes(refactor, input_str):
610-
""" Get changes.
611-
612-
:return Changes:
613-
614-
"""
615-
616-
return refactor.get_changes(input_str)
617-
618600

619601
class InlineRefactoring(Refactoring):
620602

@@ -631,14 +613,13 @@ def get_refactor(ctx):
631613
return inline.create_inline(ctx.project, ctx.resource, offset)
632614

633615
@staticmethod
634-
def get_changes(refactor, input_str):
616+
def get_changes(refactor, input_str, in_hierarchy=False):
635617
""" Get changes.
636618
637619
:return Changes:
638620
639621
"""
640-
progress = ProgressHandler('Calculate changes ...')
641-
return refactor.get_changes(task_handle=progress.handle)
622+
return refactor.get_changes()
642623

643624

644625
class UseFunctionRefactoring(Refactoring):
@@ -656,15 +637,13 @@ def get_refactor(ctx):
656637
return usefunction.UseFunction(ctx.project, ctx.resource, offset)
657638

658639
@staticmethod
659-
def get_changes(refactor, input_str):
640+
def get_changes(refactor, input_str, in_hierarchy=False):
660641
""" Get changes.
661642
662643
:return Changes:
663644
664645
"""
665-
progress = ProgressHandler('Calculate changes ...')
666-
return refactor.get_changes(
667-
resources=[refactor.resource], task_handle=progress.handle)
646+
return refactor.get_changes()
668647

669648

670649
class ModuleToPackageRefactoring(Refactoring):
@@ -681,7 +660,7 @@ def get_refactor(ctx):
681660
return ModuleToPackage(ctx.project, ctx.resource)
682661

683662
@staticmethod
684-
def get_changes(refactor, input_str):
663+
def get_changes(refactor, input_str, in_hierarchy=False):
685664
""" Get changes.
686665
687666
:return Changes:
@@ -767,7 +746,7 @@ def get_changes(self, refactor, input_string, in_hierarchy=False):
767746
changers.append(change_signature.ArgumentReorderer(
768747
order, autodef='None'))
769748

770-
return refactor.get_changes(changers)
749+
return refactor.get_changes(changers, in_hierarchy=in_hierarchy)
771750

772751

773752
class GenerateElementRefactoring(Refactoring):

0 commit comments

Comments
 (0)