Commit Graph

9 Commits

Author SHA1 Message Date
Adam Turner
00ad109a39 Run Ruff on `tests/roots/` 2025-01-03 01:33:14 +00:00
Adam Turner
f4c8a0a68e Insert `from __future__ import annotations` 2023-01-01 20:48:37 +00:00
Takeshi KOMIYA
fb92547b91 Fix #9866: autodoc: doccoment for the imported class was ignored
Autodoc tried to scan doccomment on the module where the class defined.
But it failed to get it if the class is imported from other module.

This analyzes the target module to obtain the doccomment.
2021-11-21 18:50:54 +09:00
Takeshi KOMIYA
10b7f0e252 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.
2021-09-20 13:20:26 +09:00
Takeshi KOMIYA
4ceedc102d Close #8061, #9218: autodoc: Support variable comment for alias classes 2021-05-15 16:31:40 +09:00
Takeshi KOMIYA
6c645e41f8 refactor: Deprecate no_docstring argument for Documenter.add_content()
Deprecate `no_docstring` argument for `Documenter.add_content()` again.

At the first trial (#8533), it changes the behavior of
`autodoc-process-docstring` event; it is emitted unexpectedly for an
alias of class.  But it brings an incompatible change to extensions.
Hence it was partially reverted at #8581.

This keeps not calling the event for an alias of class.  To do that,
now `Documenter.get_doc()` can return None value.
2020-12-26 21:14:26 +09:00
Takeshi KOMIYA
e2bf9166da Fix #8219: autodoc: Parameters for generic base class are not shown 2020-11-09 02:34:49 +09:00
Takeshi KOMIYA
9a44e45277 Fix #7613: autodoc: autodoc does not respect __signature__ of the class 2020-11-01 18:27:16 +09:00
Takeshi KOMIYA
24fe05f14f refactor: autodoc: class processors on autofunction is no longer needed 2020-05-07 01:55:33 +09:00