(Environment: PyCharm 5.0.2, interpreter: Python 2.7 bundled with OSX 10.10)
Hi guys,
I was not able to figure out how to get PyCharm to allow me to refactor the Move with a static method. Is it supported? I could not find any documents indicating that this is not so.
Special behavior
I launched a new workspace and put it in a file.
class MyGreatDemonstratorClass(object): @staticmethod def some_static_method(): print "static hey" @classmethod def some_class_method(cls): print "class hey" def some_instance_method(self): print "instance hey" def unbound_method(): print "unbound hey"
- I right-click on
some_static_method , hover over "Refactor", press "Move" - A red text appears that says "Cannot refactor using selected elements" ( img )
- (The same goes for
some_class_method and some_instance_method , although that makes sense to me; refactoring the related method is difficult.) - Repeat # 1 on
unbound_method , it should work.
So my question is
- Is @staticmethod refactoring supported in PyCharm?
- If not, what is the recommended way to do this? Rope?
source share