mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8274 from tk0miya/8200_typealias_break_type_annotation
Fix #8200: autodoc: type aliases break type formatting
This commit is contained in:
commit
a8abb9995f
1
CHANGES
1
CHANGES
@ -41,6 +41,7 @@ Bugs fixed
|
|||||||
typing.Generic
|
typing.Generic
|
||||||
* #8157: autodoc: TypeError is raised when annotation has invalid __args__
|
* #8157: autodoc: TypeError is raised when annotation has invalid __args__
|
||||||
* #7964: autodoc: Tuple in default value is wrongly rendered
|
* #7964: autodoc: Tuple in default value is wrongly rendered
|
||||||
|
* #8200: autodoc: type aliases break type formatting of autoattribute
|
||||||
* #8192: napoleon: description is disappeared when it contains inline literals
|
* #8192: napoleon: description is disappeared when it contains inline literals
|
||||||
* #8142: napoleon: Potential of regex denial of service in google style docs
|
* #8142: napoleon: Potential of regex denial of service in google style docs
|
||||||
* #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex
|
* #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex
|
||||||
|
@ -1736,7 +1736,8 @@ class GenericAliasDocumenter(DataDocumenter):
|
|||||||
return inspect.isgenericalias(member)
|
return inspect.isgenericalias(member)
|
||||||
|
|
||||||
def add_directive_header(self, sig: str) -> None:
|
def add_directive_header(self, sig: str) -> None:
|
||||||
self.options.annotation = SUPPRESS # type: ignore
|
self.options = Options(self.options)
|
||||||
|
self.options['annotation'] = SUPPRESS
|
||||||
super().add_directive_header(sig)
|
super().add_directive_header(sig)
|
||||||
|
|
||||||
def add_content(self, more_content: Any, no_docstring: bool = False) -> None:
|
def add_content(self, more_content: Any, no_docstring: bool = False) -> None:
|
||||||
@ -1760,7 +1761,8 @@ class TypeVarDocumenter(DataDocumenter):
|
|||||||
return isinstance(member, TypeVar) and isattr # type: ignore
|
return isinstance(member, TypeVar) and isattr # type: ignore
|
||||||
|
|
||||||
def add_directive_header(self, sig: str) -> None:
|
def add_directive_header(self, sig: str) -> None:
|
||||||
self.options.annotation = SUPPRESS # type: ignore
|
self.options = Options(self.options)
|
||||||
|
self.options['annotation'] = SUPPRESS
|
||||||
super().add_directive_header(sig)
|
super().add_directive_header(sig)
|
||||||
|
|
||||||
def get_doc(self, encoding: str = None, ignore: int = None) -> List[List[str]]:
|
def get_doc(self, encoding: str = None, ignore: int = None) -> List[List[str]]:
|
||||||
|
Loading…
Reference in New Issue
Block a user