Files
openide/python/testData/completion/slotsAsAllowedNames.py
Semyon Proshev 84e61c21cd Improve processing __slots__ in PyClassType (PY-29231, PY-29232)
Suggest unlisted attribute when `__slots__` contains `__dict__`.
Suggest listed attribute when ancestor does not have `__slots__`.
2018-05-29 17:24:37 +03:00

28 lines
316 B
Python

class A(object):
__slots__ = ['foo']
def __init__(self):
self.bar = 1
A().ba<caret>
class B:
__slots__ = ['foo']
def __init__(self):
self.bar = 1
B().ba<caret>
class C(object):
__slots__ = ['foo', '__dict__']
def __init__(self):
self.bar = 1
C().ba<caret>