summaryrefslogtreecommitdiff
path: root/tests/roots/test-ext-autodoc/target/classes.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-01 18:23:24 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-01 18:27:16 +0900
commit9a44e4527704f17cca158b260b68a8dd37f95970 (patch)
tree584ac6b58d246beded5bcfac9d9e214c00c1f4b5 /tests/roots/test-ext-autodoc/target/classes.py
parent27b1a693d0574a083a58e8b485e15904c69ecee8 (diff)
downloadsphinx-git-9a44e4527704f17cca158b260b68a8dd37f95970.tar.gz
Fix #7613: autodoc: autodoc does not respect __signature__ of the class
Diffstat (limited to 'tests/roots/test-ext-autodoc/target/classes.py')
-rw-r--r--tests/roots/test-ext-autodoc/target/classes.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/classes.py b/tests/roots/test-ext-autodoc/target/classes.py
index dc471a6f3..52c23748b 100644
--- a/tests/roots/test-ext-autodoc/target/classes.py
+++ b/tests/roots/test-ext-autodoc/target/classes.py
@@ -1,3 +1,6 @@
+from inspect import Parameter, Signature
+
+
class Foo:
pass
@@ -10,3 +13,11 @@ class Bar:
class Baz:
def __new__(cls, x, y):
pass
+
+
+class Qux:
+ __signature__ = Signature(parameters=[Parameter('foo', Parameter.POSITIONAL_OR_KEYWORD),
+ Parameter('bar', Parameter.POSITIONAL_OR_KEYWORD)])
+
+ def __init__(self, x, y):
+ pass