tests/roots/test-ext-autodoc/target/slots.py
raw| 1 | class Foo: |
| 2 | """docstring""" |
| 3 | |
| 4 | __slots__ = ['attr'] |
| 5 | |
| 6 | |
| 7 | class Bar: |
| 8 | """docstring""" |
| 9 | |
| 10 | __slots__ = { |
| 11 | 'attr1': 'docstring of attr1', |
| 12 | 'attr2': 'docstring of attr2', |
| 13 | 'attr3': None, |
| 14 | } |
| 15 | __annotations__ = {'attr1': int} |
| 16 | |
| 17 | def __init__(self): |
| 18 | self.attr2 = None #: docstring of instance attr2 |
| 19 | |
| 20 | |
| 21 | class Baz: |
| 22 | """docstring""" |
| 23 | |
| 24 | __slots__ = 'attr' # NoQA: PLC0205 |