Change parameter order in method signature not changing caller parameter order

Answered

Hi,

I'm used to IDEA refactoring operations from Java and expected the same behaviour when using
with a python script - I just wanted to change the order of a method's parameters...

The method signature itself is changed when I complete the operation, but the caller site(s) do not.
Even if I have a single calling site, the parameter order does not change, let alone if the changed signature
spans multiple scripts.

Am I doing something wrong or is this feature not the same as in Java?

Cheers,

Bonny

0
7 comments

Hi Bonny,

It sounds like an awful bug. Could you please give an example of such function and intended refactoring?

0

OK, just created a scratch file with the below fragment, completely contrived...

Here's the refactor dialog 

And the resulting code:

 

As you can see, calling method_2 within method_1 has not changed from the original 
version, even though method_2 has changed.

 

Perhaps I'm doing something wrong...

This is with Intellij IDEA, rather than PyCharm directly, but this is meant to be the same, right?

Version info (removed license info):

IntelliJ IDEA 2016.2.2
Build #IU-162.1628.40, built on August 16, 2016
JRE: 1.8.0_91-b14 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

 

Cheers,

 

Bonny

 

0

Did you move the parameters with the arrows on the side (alternatively, using hotkeys Alt+Up/Down in default Windows keymap)?

0

I used the arrow buttons on the side of the dialog box.

 

0

Should I open a ticket?

 

Cheers,

 

Bonny

0

Hi Bonny, sorry for keeping you waiting.

It indeed appears that it happens only in IntelliJ IDEA plugin, not in PyCharm. I've created an issue for you. We will try to fix it ASAP, so please stay tuned.

0

Please sign in to leave a comment.