Merge pull request #10510 from tk0miya/10509_autosummary_with_shared_object

Fix #10509: autosummary: autosummary fails with a shared library
This commit is contained in:
Takeshi KOMIYA 2022-06-03 02:49:04 +09:00 committed by GitHub
commit 53ca7222dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -37,6 +37,7 @@ Features added
Bugs fixed
----------
* #10509: autosummary: autosummary fails with a shared library
* #10498: gettext: TypeError is raised when sorting warning messages if a node
has no line number
* #10493: html theme: :rst:dir:`topic` directive is rendered incorrectly with

View File

@ -155,8 +155,12 @@ class ModuleScanner:
def scan(self, imported_members: bool) -> List[str]:
members = []
analyzer = ModuleAnalyzer.for_module(self.object.__name__)
attr_docs = analyzer.find_attr_docs()
try:
analyzer = ModuleAnalyzer.for_module(self.object.__name__)
attr_docs = analyzer.find_attr_docs()
except PycodeError:
attr_docs = {}
for name in members_of(self.object, self.app.config):
try:
value = safe_getattr(self.object, name)