summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autodoc/target/inherited_annotations.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
commit5bb0bb4be543fd5eca41673696a62ed80d493591 (patch)
treead2c464f140e86c7f178a6276d7ea4a93e3e6c92 /tests/roots/test-ext-autodoc/target/inherited_annotations.py
parentAdding upstream version 7.2.6. (diff)
downloadsphinx-5bb0bb4be543fd5eca41673696a62ed80d493591.tar.xz
sphinx-5bb0bb4be543fd5eca41673696a62ed80d493591.zip
Adding upstream version 7.3.7.upstream/7.3.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/roots/test-ext-autodoc/target/inherited_annotations.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/inherited_annotations.py b/tests/roots/test-ext-autodoc/target/inherited_annotations.py
new file mode 100644
index 0000000..3ae58a8
--- /dev/null
+++ b/tests/roots/test-ext-autodoc/target/inherited_annotations.py
@@ -0,0 +1,17 @@
+"""
+ Test case for #11387 corner case involving inherited
+ members with type annotations on python 3.9 and earlier
+"""
+
+class HasTypeAnnotatedMember:
+ inherit_me: int
+ """Inherited"""
+
+class NoTypeAnnotation(HasTypeAnnotatedMember):
+ a = 1
+ """Local"""
+
+class NoTypeAnnotation2(HasTypeAnnotatedMember):
+ a = 1
+ """Local"""
+