All resource __init__ methods type the client as Any:
class Completions:
def __init__(self, client: Any) -> None:
This loses type safety on self._client._request(...) across every resource (completions, embeddings, images, models, admin).
What to do
Use TYPE_CHECKING imports to type the client as FerroClient (sync) / AsyncFerroClient (async) without circular imports:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ferrolabsai.client import FerroClient
class Completions:
def __init__(self, client: "FerroClient") -> None: ...
There is currently no TYPE_CHECKING usage in the package, so this establishes the pattern repo-wide.
All resource
__init__methods type the client asAny:This loses type safety on
self._client._request(...)across every resource (completions,embeddings,images,models,admin).What to do
Use
TYPE_CHECKINGimports to type the client asFerroClient(sync) /AsyncFerroClient(async) without circular imports:There is currently no
TYPE_CHECKINGusage in the package, so this establishes the pattern repo-wide.