Files
Mikhail Golubev f76600603e PY-46099 PY-47633 Don't remember usages in non-physical copies of methods in Pull Up/Down
PSI element copies exists in special non-physical files (DummyHolders),
and usually references in them cannot be resolved. It led both to exceptions,
when the rest of the code insight didn't expect resolve to happen in files other
than PyFile (PY-46099), and situations when we failed to resolve a usage in
a copy and restore the corresponding import (PY-47633).

Switching to processing original declarations also revealed a problem with
inserting imports -- we might have tried to insert impossible imports for
non-top-level symbols, such as class attributes and methods. Now, these are
ignored.

GitOrigin-RevId: 6816078596a2c0aced7045a80828b7e83ebee8c0
2021-03-23 21:14:17 +00:00

28 lines
423 B
Python

import logging
from SuperClass import SuperClass
class AnyClass(SuperClass):
C = 1
def __init__(self):
super(AnyClass, self).__init__()
@property
def new_property(self):
return 1
@new_property.setter
def new_property(self, value):
logging.debug("Setting %s", value)
@new_property.deleter
def new_property(self):
pass
def foo(self):
pass