| 1 |
from os import path |
| 2 |
from typing import Union |
| 3 |
|
| 4 |
from autosummary_class_module import Class |
| 5 |
|
| 6 |
__all__ = [ |
| 7 |
'CONSTANT1', |
| 8 |
'Exc', |
| 9 |
'Foo', |
| 10 |
'_Baz', |
| 11 |
'bar', |
| 12 |
'qux', |
| 13 |
'path', |
| 14 |
] |
| 15 |
|
| 16 |
#: module variable |
| 17 |
CONSTANT1 = None |
| 18 |
CONSTANT2 = None |
| 19 |
|
| 20 |
|
| 21 |
class Foo: |
| 22 |
#: class variable |
| 23 |
CONSTANT3 = None |
| 24 |
CONSTANT4 = None |
| 25 |
|
| 26 |
class Bar: # NoQA: D106 |
| 27 |
pass |
| 28 |
|
| 29 |
def __init__(self): |
| 30 |
#: docstring |
| 31 |
self.value = 1 |
| 32 |
|
| 33 |
def bar(self): |
| 34 |
pass |
| 35 |
|
| 36 |
@property |
| 37 |
def baz(self): |
| 38 |
pass |
| 39 |
|
| 40 |
|
| 41 |
class _Baz: |
| 42 |
pass |
| 43 |
|
| 44 |
|
| 45 |
def bar(x: Union[int, str], y: int = 1) -> None: # NoQA: UP007 |
| 46 |
pass |
| 47 |
|
| 48 |
|
| 49 |
def _quux(): |
| 50 |
pass |
| 51 |
|
| 52 |
|
| 53 |
class Exc(Exception): |
| 54 |
pass |
| 55 |
|
| 56 |
|
| 57 |
class _Exc(Exception): |
| 58 |
pass |
| 59 |
|
| 60 |
|
| 61 |
#: a module-level attribute |
| 62 |
qux = 2 |
| 63 |
#: a module-level attribute that has been excluded from __all__ |
| 64 |
quuz = 2 |
| 65 |
|
| 66 |
considered_as_imported = Class() |
| 67 |
non_imported_member = Class() |
| 68 |
""" This attribute has a docstring, so it is recognized as a not-imported member """ |