mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.4.x' into 4.x
This commit is contained in:
commit
1d68973f20
3
CHANGES
3
CHANGES
@ -48,6 +48,9 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #9876: autodoc: Failed to document an imported class that is built from native
|
||||
binary module
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -1771,9 +1771,12 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
|
||||
def add_content(self, more_content: Optional[StringList], no_docstring: bool = False
|
||||
) -> None:
|
||||
if self.doc_as_attr and self.modname != self.get_real_modname():
|
||||
# override analyzer to obtain doccomment around its definition.
|
||||
self.analyzer = ModuleAnalyzer.for_module(self.modname)
|
||||
self.analyzer.analyze()
|
||||
try:
|
||||
# override analyzer to obtain doccomment around its definition.
|
||||
self.analyzer = ModuleAnalyzer.for_module(self.modname)
|
||||
self.analyzer.analyze()
|
||||
except PycodeError:
|
||||
pass
|
||||
|
||||
if self.doc_as_attr and not self.get_variable_comment():
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user