rope.refactor.change_signature
Classes
Module Contents
- class rope.refactor.change_signature.ChangeSignature(project, resource, offset)
- project
- resource
- offset
- get_args()
Get function arguments.
Return a list of
(name, default)tuples for all but star and double star arguments. For arguments that don’t have a default, None will be used.
- is_method()
- get_definition_info()
- normalize()
- remove(index)
- add(index, name, default=None, value=None)
- inline_default(index)
- reorder(new_ordering)
- get_changes(changers, in_hierarchy=False, resources=None, task_handle=taskhandle.DEFAULT_TASK_HANDLE)
Get changes caused by this refactoring
changers is a list of _ArgumentChanger. If in_hierarchy is True the changers are applied to all matching methods in the class hierarchy. resources can be a list of rope.base.resource.File that should be searched for occurrences; if None all python files in the project are searched.
- class rope.refactor.change_signature.ArgumentNormalizer
Bases:
_ArgumentChanger- change_definition_info(definition_info)
- change_argument_mapping(definition_info, argument_mapping)
- class rope.refactor.change_signature.ArgumentRemover(index)
Bases:
_ArgumentChanger- index
- change_definition_info(call_info)
- change_argument_mapping(definition_info, mapping)
- class rope.refactor.change_signature.ArgumentAdder(index, name, default=None, value=None)
Bases:
_ArgumentChanger- index
- name
- default = None
- value = None
- change_definition_info(definition_info)
- change_argument_mapping(definition_info, mapping)