-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classes that inherit mocked imports do not generate docstrings using autodoc. #8164
Labels
Milestone
Comments
Note: This was changed since #7504. |
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Nov 11, 2020
The mock objects set up via `autosummary_mock_imports` causes slow down of autosummary stub generation because AttributeDocumenter falls into infinite recursion call to unwrap decorators of mocked objects. To avoid the trouble, this blocks unwrapping decorators of mocked objects.
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Dec 28, 2020
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Dec 28, 2020
…ot documented Use ismock() to check a module member is a mocked or not. It allows not to skip subclasses of mocked class.
This was referenced Dec 28, 2020
Closed
tk0miya
added a commit
to tk0miya/sphinx
that referenced
this issue
Dec 28, 2020
…ot documented Use ismock() to check a module member is a mocked or not. It allows not to skip subclasses of mocked class.
tk0miya
added a commit
that referenced
this issue
Dec 29, 2020
Fix #8164: autodoc: Classes that inherit mocked class are not documented
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When a class inherits another class from a mocked import as defined in
autodoc_mock_imports
, the docstring is skipped by autodoc when building documentation.To Reproduce
Example project taken from #4965
Project module foo.py:
conf.py:
contents.rst:
Build Command
Expected behavior
The built documentation would include the
foo.FooClass
class and its docstring.Your project
mocked_import_issue.zip
Environment info
Additional context
Sphinx 3.0.1 build correctly, later versions skip the
foo.FooClass
when building documentation.The text was updated successfully, but these errors were encountered: