Files
openide/python/testData/completion/slots.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

29 lines
278 B
Python

class A(object):
__slots__ = ['foo', 'bar']
a = A()
a.ba<caret>
class B(object):
__slots__ = ['bar']
class C(B):
pass
C().ba<caret>
class D(object):
pass
class E(D):
__slots__ = ['bar']
E().ba<caret>
class F:
__slots__ = ['baz']
F().ba<caret>