I’m using eric4 and its rope plug-in to refactor some code.
I have many method whose signatures use the *args and **kwargs syntax.
I’d like to change these signatures an remove this parameters.
I’ve tried using the Refactoring>Refactoring>Change Method Signature but this does not remove *args and **kwargs parameters.
I wonder if this is a limitation of rope itself, or if it’s eric’s plug-in that does not support this feature.
Why do you want to remove
*argsand**kwargs? To refactor those functions, a refactoring library would need to perform quite a bit of introspection to know the correct parameters.For example, how would you refactor the following function:
You could turn it into:
It requires quite a bit of code analysis to do this already and for real functions it is even harder. The number of positional and keyword arguments can vary (e.g., the function could iterate over
args) which makes it difficult to determine the correct function arguments.Unless there is a real need, I would keep the
*argsand**kwargsand focus on other refactoring efforts.