mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7336 from tk0miya/7329_typehints_description_for_class
Fix #7329: autodoc: typehints doc is wrongly generated
This commit is contained in:
commit
54dada2eee
2
CHANGES
2
CHANGES
@ -124,6 +124,8 @@ Bugs fixed
|
||||
generated automatically in signatures.
|
||||
* #5637: autodoc: Incorrect handling of nested class names on show-inheritance
|
||||
* #7267: autodoc: error message for invalid directive options has wrong location
|
||||
* #7329: autodoc: info-field-list is wrongly generated from type hints into the
|
||||
class description even if ``autoclass_content='class'`` set
|
||||
* #5637: inheritance_diagram: Incorrect handling of nested class names
|
||||
* #7139: ``code-block:: guess`` does not work
|
||||
* #7325: html: source_suffix containing dot leads to wrong source link
|
||||
|
@ -43,6 +43,8 @@ def merge_typehints(app: Sphinx, domain: str, objtype: str, contentnode: Element
|
||||
return
|
||||
if app.config.autodoc_typehints != 'description':
|
||||
return
|
||||
if objtype == 'class' and app.config.autoclass_content not in ('init', 'both'):
|
||||
return
|
||||
|
||||
signature = cast(addnodes.desc_signature, contentnode.parent[0])
|
||||
if signature['module']:
|
||||
|
Loading…
Reference in New Issue
Block a user