Skip to content

Commit db9cffe

Browse files
committed
Merge branch 'cleanup/util-2b-typing-union-bugfix' into cleanup/util-2c-typing-reformat-style
2 parents 2824f1f + 1f60b25 commit db9cffe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinx/ext/autodoc/mock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __contains__(self, key: str) -> bool:
5454
def __iter__(self) -> Iterator[Any]:
5555
return iter([])
5656

57-
def __mro_entries__(self, bases: tuple[Any, ...]) -> tuple[type[Any], ...]:
57+
def __mro_entries__(self, bases: tuple[Any, ...]) -> tuple[type, ...]:
5858
return (self.__class__,)
5959

6060
def __getitem__(self, key: Any) -> _MockObject:
@@ -160,8 +160,8 @@ def mock(modnames: list[str]) -> Iterator[None]:
160160
# mock modules are enabled here
161161
...
162162
"""
163+
finder = MockFinder(modnames)
163164
try:
164-
finder = MockFinder(modnames)
165165
sys.meta_path.insert(0, finder)
166166
yield
167167
finally:

0 commit comments

Comments
 (0)