(self, timeout: TimeoutTypes | UnsetType)
| 122 | return self._client |
| 123 | |
| 124 | def _get_timeout(self, timeout: TimeoutTypes | UnsetType) -> aiohttp.ClientTimeout: |
| 125 | _timeout = None |
| 126 | if isinstance(timeout, Timeout): |
| 127 | timeout_kwargs: dict[str, float | None] = exclude_unset( |
| 128 | { |
| 129 | "total": timeout.total, |
| 130 | "connect": timeout.connect, |
| 131 | "sock_read": timeout.read, |
| 132 | } |
| 133 | ) |
| 134 | if timeout_kwargs: |
| 135 | _timeout = aiohttp.ClientTimeout(**timeout_kwargs) # type: ignore |
| 136 | elif timeout is not UNSET: |
| 137 | _timeout = aiohttp.ClientTimeout(connect=timeout, sock_read=timeout) |
| 138 | |
| 139 | if _timeout is None: |
| 140 | return self._timeout |
| 141 | return _timeout |
| 142 | |
| 143 | @override |
| 144 | async def request(self, setup: Request) -> Response: |
no test coverage detected