diff options
Diffstat (limited to 'sphinx/ext/autodoc/mock.py')
| -rw-r--r-- | sphinx/ext/autodoc/mock.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/ext/autodoc/mock.py b/sphinx/ext/autodoc/mock.py index bc57d9078..169034664 100644 --- a/sphinx/ext/autodoc/mock.py +++ b/sphinx/ext/autodoc/mock.py @@ -4,7 +4,7 @@ mock for autodoc - :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,7 +26,7 @@ class _MockObject: __display_name__ = '_MockObject' - def __new__(cls, *args, **kwargs) -> Any: + def __new__(cls, *args: Any, **kwargs: Any) -> Any: if len(args) == 3 and isinstance(args[1], tuple): superclass = args[1][-1].__class__ if superclass is cls: @@ -36,7 +36,7 @@ class _MockObject: return super().__new__(cls) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: self.__qualname__ = '' def __len__(self) -> int: @@ -57,7 +57,7 @@ class _MockObject: def __getattr__(self, key: str) -> "_MockObject": return _make_subclass(key, self.__display_name__, self.__class__)() - def __call__(self, *args, **kw) -> Any: + def __call__(self, *args: Any, **kw: Any) -> Any: if args and type(args[0]) in [type, FunctionType, MethodType]: # Appears to be a decorator, pass through unchanged return args[0] |
