mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
Suggest unlisted attribute when `__slots__` contains `__dict__`. Suggest listed attribute when ancestor does not have `__slots__`.
29 lines
253 B
Python
29 lines
253 B
Python
class A(object):
|
|
__slots__ = ['foo', 'bar']
|
|
|
|
a = A()
|
|
a.bar
|
|
|
|
|
|
class B(object):
|
|
__slots__ = ['bar']
|
|
|
|
class C(B):
|
|
pass
|
|
|
|
C().bar
|
|
|
|
|
|
class D(object):
|
|
pass
|
|
|
|
class E(D):
|
|
__slots__ = ['bar']
|
|
|
|
E().bar
|
|
|
|
|
|
class F:
|
|
__slots__ = ['baz']
|
|
|
|
F().ba |