fix: GSDFC docstring conformance, modernize legacy typing to match signatures; regenerate lib/MCP docs (pydoclint zero)

This commit is contained in:
2026-09-13 16:21:12 +05:30
parent af8bb5add8
commit b530276df2
49 changed files with 292 additions and 217 deletions

View File

@@ -60,7 +60,7 @@ class PickleCredentialStore(CredentialStore[T]):
Load credentials from the local filesystem.
Returns:
Optional[T]:
T | None:
An instance of type `T` if credentials are present and
successfully deserialized; otherwise `None`.

View File

@@ -66,21 +66,10 @@ class RedisCredentialStore(CredentialStore[T]):
"""
Initialize a Redis-backed credential store.
Args:
redis_client (Any):
An initialized Redis client instance (for example, ``redis.Redis`` or a compatible interface) used to communicate with the Redis server.
key (str):
The Redis key under which credentials are stored. Callers are responsible for applying appropriate namespacing to avoid collisions.
serialize (Callable[[T], bytes]):
A callable that converts a credential object of type ``T`` into a ``bytes`` representation suitable for storage in Redis.
deserialize (Callable[[bytes], T]):
A callable that converts a ``bytes`` payload retrieved from Redis back into a credential object of type ``T``.
ttl_seconds (Optional[int]):
Optional time-to-live (TTL) for the stored credentials, expressed in seconds. When provided, Redis will automatically expire the stored credentials after the specified duration. If ``None``, credentials are stored without an expiration.
Callers supply all runtime dependencies: ``redis_client`` is an
initialized Redis client instance, ``key`` names the storage key,
``serialize``/``deserialize`` are the encoding and decoding callables,
and ``ttl_seconds`` optionally limits credential lifetime.
"""
self.redis = redis_client
self.key = key
@@ -93,7 +82,7 @@ class RedisCredentialStore(CredentialStore[T]):
Load credentials from Redis.
Returns:
Optional[T]:
T | None:
An instance of type `T` if credentials are present and
successfully deserialized; otherwise `None`.

View File

@@ -52,7 +52,7 @@ class CredentialStore(ABC, Generic[T]):
Load previously persisted credentials.
Returns:
Optional[T]:
T | None:
An instance of type `T` if credentials are available and
loadable; otherwise `None`.