Coverage for qreward / types.py: 100.00%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-23 19:32 +0000

1from collections.abc import Callable, Coroutine 

2from typing import Any, Tuple, Union 

3 

4from httpx import Request, Response 

5 

6# socket options type 

7SOCKET_OPTION = Union[ 

8 Tuple[int, int, int], 

9 Tuple[int, int, Union[bytes, bytearray]], 

10 Tuple[int, int, None, int], 

11] 

12 

13 

14# simple retry types 

15RetryPredicate = Callable[[Exception], bool] 

16BackoffGenerator = Callable[[int], float] 

17 

18 

19# httpx hook type 

20RequestHook = Callable[[Request], None] | Coroutine[Any, Any, None] 

21ResponseHook = Callable[[Response], None] | Coroutine[Any, Any, None]