summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autosummary/autosummary_dummy_module.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
commitcf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch)
tree18dcde1a8d1f5570a77cd0c361de3b490d02c789 /tests/roots/test-ext-autosummary/autosummary_dummy_module.py
parentInitial commit. (diff)
downloadsphinx-upstream/7.2.6.tar.xz
sphinx-upstream/7.2.6.zip
Adding upstream version 7.2.6.upstream/7.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-ext-autosummary/autosummary_dummy_module.py')
-rw-r--r--tests/roots/test-ext-autosummary/autosummary_dummy_module.py68
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autosummary/autosummary_dummy_module.py b/tests/roots/test-ext-autosummary/autosummary_dummy_module.py
new file mode 100644
index 0000000..2d8829a
--- /dev/null
+++ b/tests/roots/test-ext-autosummary/autosummary_dummy_module.py
@@ -0,0 +1,68 @@
+from os import path
+from typing import Union
+
+from autosummary_class_module import Class
+
+__all__ = [
+ "CONSTANT1",
+ "Exc",
+ "Foo",
+ "_Baz",
+ "bar",
+ "qux",
+ "path",
+]
+
+#: module variable
+CONSTANT1 = None
+CONSTANT2 = None
+
+
+class Foo:
+ #: class variable
+ CONSTANT3 = None
+ CONSTANT4 = None
+
+ class Bar:
+ pass
+
+ def __init__(self):
+ #: docstring
+ self.value = 1
+
+ def bar(self):
+ pass
+
+ @property
+ def baz(self):
+ pass
+
+
+class _Baz:
+ pass
+
+
+def bar(x: Union[int, str], y: int = 1) -> None:
+ pass
+
+
+def _quux():
+ pass
+
+
+class Exc(Exception):
+ pass
+
+
+class _Exc(Exception):
+ pass
+
+
+#: a module-level attribute
+qux = 2
+#: a module-level attribute that has been excluded from __all__
+quuz = 2
+
+considered_as_imported = Class()
+non_imported_member = Class()
+""" This attribute has a docstring, so it is recognized as a not-imported member """