Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/mock_vws/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from collections.abc import Callable, Generator, Mapping
from contextlib import contextmanager
from dataclasses import dataclass
from types import TracebackType
from typing import TYPE_CHECKING, Literal, Self
from urllib.parse import urlparse

Expand Down Expand Up @@ -558,16 +559,17 @@ def __enter__(self) -> Self:
self._started.append((mock, router, httpx2_router))
return self

def __exit__(self, *exc: object) -> Literal[False]:
def __exit__(
self,
_exc_type: type[BaseException] | None,
_exc_value: BaseException | None,
_traceback: TracebackType | None,
) -> Literal[False]:
"""Stop the Vuforia mock.

Returns:
False
"""
# __exit__ needs this to be passed in but vulture thinks that it is
# unused, so we "use" it here.
del exc

mock, router, httpx2_router = self._started.pop()
mock.stop()
router.stop()
Expand Down
Loading