mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 08:00:18 +07:00
* `pass` is consistently inserted on the new line now * excess spaces left after element was deleted are removed Use PyUtil#deleteElementSafely in pull, push and extract superclass refactoring implementations. It turned out that all problems with whitespaces left after we moved function are rooted in awkward implementation of PyFunctionImpl#delete() that delegated to plain AST manipulation and thus ignored usual additional reformatting step. I removed it and it's allowed to clean a lot of test files and remove the code that was added previously exactly for this purpose in PyMoveSymbolProcessor.
28 lines
478 B
Python
28 lines
478 B
Python
class DataHolder:
|
|
VAR = 1
|
|
|
|
class Parent:
|
|
A_FIELD = DataHolder.VAR
|
|
CLASS_FIELD = 42
|
|
ANOTHER_CLASS_FIELD = CLASS_FIELD
|
|
BOO = 12
|
|
FIELD = BOO
|
|
|
|
def __init__(self):
|
|
self.d = Parent.BOO
|
|
self.c = 1
|
|
self.b = self.c
|
|
|
|
@staticmethod
|
|
def foo():
|
|
return "A"
|
|
|
|
SOME_VAR = foo()
|
|
|
|
|
|
class Child(Parent): # Try to pull members up
|
|
|
|
def __init__(self):
|
|
super(Child, self).__init__()
|
|
self.a = 12
|
|
i = 1 |