mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
Suggest unlisted attribute when `__slots__` contains `__dict__`. Suggest listed attribute when ancestor does not have `__slots__`.
28 lines
316 B
Python
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> |