We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dacb14e + e2b1eef commit 1f60b25Copy full SHA for 1f60b25
sphinx/ext/autodoc/mock.py
@@ -54,7 +54,7 @@ def __contains__(self, key: str) -> bool:
54
def __iter__(self) -> Iterator[Any]:
55
return iter([])
56
57
- def __mro_entries__(self, bases: tuple[Any, ...]) -> tuple[type[Any], ...]:
+ def __mro_entries__(self, bases: tuple[Any, ...]) -> tuple[type, ...]:
58
return (self.__class__,)
59
60
def __getitem__(self, key: Any) -> _MockObject:
@@ -160,8 +160,8 @@ def mock(modnames: list[str]) -> Iterator[None]:
160
# mock modules are enabled here
161
...
162
"""
163
+ finder = MockFinder(modnames)
164
try:
- finder = MockFinder(modnames)
165
sys.meta_path.insert(0, finder)
166
yield
167
finally:
0 commit comments