diff options
author | Michael Leinartas <mleinartas@twitter.com> | 2016-10-19 16:20:16 -0500 |
---|---|---|
committer | Michael Leinartas <mleinartas@twitter.com> | 2016-10-19 20:30:24 -0500 |
commit | f8200bdddc4a84cabd656cf0bd9ae185fa703857 (patch) | |
tree | 4ad4d46846fa84270ee0b1d4d4622d8173e249a3 /sphinx/ext/autodoc.py | |
parent | 6e5964ac274e2a2638ecdbb8876dfd978f4e09db (diff) | |
download | sphinx-git-f8200bdddc4a84cabd656cf0bd9ae185fa703857.tar.gz |
Autodoc: Allow mocked module decorators to pass-through
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 6a1d907fd..a936fdddd 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -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): |