mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
Suggest unlisted attribute when `__slots__` contains `__dict__`. Suggest listed attribute when ancestor does not have `__slots__`.
28 lines
297 B
Python
28 lines
297 B
Python
class A(object):
|
|
__slots__ = ['foo']
|
|
|
|
def __init__(self):
|
|
self.bar = 1
|
|
|
|
|
|
A().ba
|
|
|
|
|
|
class B:
|
|
__slots__ = ['foo']
|
|
|
|
def __init__(self):
|
|
self.bar = 1
|
|
|
|
|
|
B().bar
|
|
|
|
|
|
class C(object):
|
|
__slots__ = ['foo', '__dict__']
|
|
|
|
def __init__(self):
|
|
self.bar = 1
|
|
|
|
|
|
C().bar |