PY-21099: Store dependency information and use it for refactoring, obey target ref. dependency

* Dependency info may be lost when new member is created, so we store it on PSI level
* Support target reference dependency
* Method can't be abstract when property depends on it

GitOrigin-RevId: 24b9b64ef4ce60dd19bc4696e1d7aabf6a260067
This commit is contained in:
Ilya.Kazakevich
2021-06-22 23:09:02 +03:00
committed by intellij-monorepo-bot
parent d11eddd8a3
commit 38406a3b71
14 changed files with 223 additions and 30 deletions

View File

@@ -0,0 +1,16 @@
from abc import ABCMeta, abstractmethod
class Spam(metaclass=ABCMeta):
@abstractmethod
def __add__(self, other):
pass
__radd__ = __add__
class C(Spam):
def __add__(self, other):
pass
#
#

View File

@@ -0,0 +1,7 @@
class C:
def __add__(self, other):
pass
__radd__ = __add__
#
#

View File

@@ -17,4 +17,9 @@ class StaticOnly(object):
class OldClass():
def foo(self):
pass
pass
class ExtractMe:
def __add__(self, other):
__radd__ = __add__