Inject default configuration values.
(
self,
timeout: float = cast(float, _UNSET),
watchdog_timeout: float = cast(float, _UNSET),
auto_close: bool = False,
close_delay: float = cast(float, _UNSET),
auto_refresh: bool = cast(bool, _UNSET),
refresh_interval: float = cast(float, _UNSET),
verbose: bool = cast(bool, _UNSET),
)
| 29 | self.id = client_id |
| 30 | |
| 31 | async def init( |
| 32 | self, |
| 33 | timeout: float = cast(float, _UNSET), |
| 34 | watchdog_timeout: float = cast(float, _UNSET), |
| 35 | auto_close: bool = False, |
| 36 | close_delay: float = cast(float, _UNSET), |
| 37 | auto_refresh: bool = cast(bool, _UNSET), |
| 38 | refresh_interval: float = cast(float, _UNSET), |
| 39 | verbose: bool = cast(bool, _UNSET), |
| 40 | ) -> None: |
| 41 | """ |
| 42 | Inject default configuration values. |
| 43 | """ |
| 44 | config = g_config.gemini |
| 45 | timeout = cast(float, _resolve(timeout, config.timeout)) |
| 46 | watchdog_timeout = cast(float, _resolve(watchdog_timeout, config.watchdog_timeout)) |
| 47 | close_delay = timeout |
| 48 | auto_refresh = cast(bool, _resolve(auto_refresh, config.auto_refresh)) |
| 49 | refresh_interval = cast(float, _resolve(refresh_interval, config.refresh_interval)) |
| 50 | verbose = cast(bool, _resolve(verbose, config.verbose)) |
| 51 | |
| 52 | try: |
| 53 | await super().init( |
| 54 | timeout=timeout, |
| 55 | watchdog_timeout=watchdog_timeout, |
| 56 | auto_close=auto_close, |
| 57 | close_delay=close_delay, |
| 58 | auto_refresh=auto_refresh, |
| 59 | refresh_interval=refresh_interval, |
| 60 | verbose=verbose, |
| 61 | ) |
| 62 | except Exception: |
| 63 | logger.exception(f"Failed to initialize GeminiClient {self.id}") |
| 64 | raise |
| 65 | |
| 66 | def running(self) -> bool: |
| 67 | return self._running |
nothing calls this directly
no test coverage detected