diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-09-20 13:20:26 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-09-20 13:20:26 +0900 |
commit | 10b7f0e2522e44fe33f900ef317c25bbadeeb5a0 (patch) | |
tree | c186a5cb61cee64b5f922897617a4cff0d960a52 /tests/roots/test-ext-autodoc/target/classes.py | |
parent | a05dc0b41992b92fc4e352439a27eddd0f5a88a9 (diff) | |
download | sphinx-git-10b7f0e2522e44fe33f900ef317c25bbadeeb5a0.tar.gz |
Fix #9607: autodoc: Incorrect base class detection
In case of the descendants of generic class, the value of
obj.__orig_bases__ is incorrect because it returns original base
arguments for the child of the generic class instead of the target
class itself.
This uses obj.__dict__ to get the correct __orig_bases__ information.
Diffstat (limited to 'tests/roots/test-ext-autodoc/target/classes.py')
-rw-r--r-- | tests/roots/test-ext-autodoc/target/classes.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/classes.py b/tests/roots/test-ext-autodoc/target/classes.py index 7526e65bc..d18128584 100644 --- a/tests/roots/test-ext-autodoc/target/classes.py +++ b/tests/roots/test-ext-autodoc/target/classes.py @@ -29,6 +29,10 @@ class Quux(List[Union[int, float]]): pass +class Corge(Quux): + pass + + Alias = Foo #: docstring |