summaryrefslogtreecommitdiff
path: root/t/mocks.py
diff options
context:
space:
mode:
Diffstat (limited to 't/mocks.py')
-rw-r--r--t/mocks.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/mocks.py b/t/mocks.py
index 51ef32fb..e4cfa3f7 100644
--- a/t/mocks.py
+++ b/t/mocks.py
@@ -1,5 +1,7 @@
+from __future__ import annotations
+
from itertools import count
-from typing import TYPE_CHECKING, Optional, Type
+from typing import TYPE_CHECKING
from unittest.mock import Mock
from kombu.transport import base
@@ -19,9 +21,9 @@ class _ContextMock(Mock):
def __exit__(
self,
- exc_type: Optional[Type[BaseException]],
- exc_val: Optional[BaseException],
- exc_tb: Optional['TracebackType']
+ exc_type: type[BaseException] | None,
+ exc_val: BaseException | None,
+ exc_tb: TracebackType | None
) -> None:
pass