88import warnings
99from collections .abc import Awaitable , Callable
1010from dataclasses import dataclass
11- from typing import Any , Literal , overload , cast
11+ from typing import Any , cast
1212
1313from tesla_fleet_api .const import (
1414 AuthorizationRole ,
@@ -406,15 +406,7 @@ async def list_authorized_clients(self) -> dict[str, Any]:
406406 f"api/1/energy_sites/{ self .energy_site_id } /command/authorized_clients" ,
407407 )
408408
409- @overload
410- async def find_authorized_clients (
411- self , raw : Literal [False ] = False
412- ) -> AuthorizedClients : ...
413- @overload
414- async def find_authorized_clients (self , raw : Literal [True ]) -> dict [str , Any ]: ...
415- async def find_authorized_clients (
416- self , raw : bool = False
417- ) -> AuthorizedClients | dict [str , Any ]:
409+ async def find_authorized_clients (self ) -> AuthorizedClients :
418410 """List authorized clients on the energy gateway, parsed into a typed result.
419411
420412 Prefer this over :meth:`list_authorized_clients` for consumers that
@@ -426,14 +418,9 @@ async def find_authorized_clients(
426418 treating either as "no clients". See :class:`AuthorizedClients` for
427419 the exact parsing semantics.
428420
429- ``raw=True`` returns the unparsed response exactly as
430- :meth:`list_authorized_clients` does, skipping the typed parse - for
431- callers that want the same call shape aligned with the local
432- gateway path while still opting out of typing.
421+ For the unparsed response, use :meth:`list_authorized_clients`.
433422 """
434423 response = await self .list_authorized_clients ()
435- if raw :
436- return response
437424 return parse_authorized_clients (response )
438425
439426 async def remove_authorized_client (self , public_key : bytes | str ) -> dict [str , Any ]:
0 commit comments