mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Autodoc: Allow mocked module decorators to pass-through
This commit is contained in:
parent
6e5964ac27
commit
f8200bdddc
@ -93,6 +93,9 @@ class _MockModule(object):
|
||||
self.__all__ = []
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
if args and type(args[0]) in [FunctionType, MethodType]:
|
||||
# Appears to be a decorator, pass through unchanged
|
||||
return args[0]
|
||||
return _MockModule()
|
||||
|
||||
def _append_submodule(self, submod):
|
||||
|
Loading…
Reference in New Issue
Block a user