mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #7629: autodoc: autofunction emits an unfriendly warning
This commit is contained in:
parent
63457c700c
commit
182712fe31
2
CHANGES
2
CHANGES
@ -90,6 +90,8 @@ Bugs fixed
|
||||
* #7362: autodoc: does not render correct signatures for built-in functions
|
||||
* #7654: autodoc: ``Optional[Union[foo, bar]]`` is presented as
|
||||
``Union[foo, bar, None]``
|
||||
* #7629: autodoc: autofunction emits an unfriendly warning if an invalid object
|
||||
specified
|
||||
* #7551: autosummary: a nested class is indexed as non-nested class
|
||||
* #7535: sphinx-autogen: crashes when custom template uses inheritance
|
||||
* #7536: sphinx-autogen: crashes when template uses i18n feature
|
||||
|
@ -1056,7 +1056,11 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # typ
|
||||
self.env.app.emit('autodoc-before-process-signature', unwrapped, False)
|
||||
sig = inspect.signature(unwrapped)
|
||||
args = stringify_signature(sig, **kwargs)
|
||||
except TypeError:
|
||||
except TypeError as exc:
|
||||
logger.warning(__("Failed to get a function signature for %s: %s"),
|
||||
self.fullname, exc)
|
||||
return None
|
||||
except ValueError:
|
||||
args = ''
|
||||
|
||||
if self.env.config.strip_signature_backslash:
|
||||
|
Loading…
Reference in New Issue
Block a user