fix: GSDFC docstring conformance, modernize legacy typing to match signatures; regenerate lib/MCP docs (pydoclint zero)
This commit is contained in:
@@ -55,11 +55,11 @@ def _extract_from_part(part: dict[str, Any]) -> str | None:
|
||||
- `text/html` (converted to plain text)
|
||||
|
||||
Args:
|
||||
part (Dict[str, Any]):
|
||||
part (dict[str, Any]):
|
||||
MIME part dictionary from a provider payload.
|
||||
|
||||
Returns:
|
||||
Optional[str]:
|
||||
str | None:
|
||||
Extracted plain-text content, or `None` if unsupported or empty.
|
||||
"""
|
||||
mime_type = part.get("mimeType")
|
||||
@@ -94,7 +94,7 @@ def extract_body(payload: dict[str, Any]) -> str:
|
||||
4. Empty string (if nothing usable found)
|
||||
|
||||
Args:
|
||||
payload (Dict[str, Any]):
|
||||
payload (dict[str, Any]):
|
||||
Provider-native message payload dictionary.
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -16,11 +16,11 @@ def parse_headers(raw_headers: list[dict[str, str]]) -> dict[str, str]:
|
||||
Convert a list of Gmail-style headers into a normalized dict.
|
||||
|
||||
Args:
|
||||
raw_headers (List[Dict[str, str]]):
|
||||
raw_headers (list[dict[str, str]]):
|
||||
List of header dictionaries, each containing `name` and `value` keys.
|
||||
|
||||
Returns:
|
||||
Dict[str, str]:
|
||||
dict[str, str]:
|
||||
Dictionary mapping lowercase header names to stripped values.
|
||||
|
||||
Notes:
|
||||
@@ -67,11 +67,11 @@ def extract_sender(headers: dict[str, str]) -> tuple[str, str | None]:
|
||||
Extract sender email and optional display name from headers.
|
||||
|
||||
Args:
|
||||
headers (Dict[str, str]):
|
||||
headers (dict[str, str]):
|
||||
Normalized header dictionary as returned by `parse_headers()`.
|
||||
|
||||
Returns:
|
||||
Tuple[str, Optional[str]]:
|
||||
tuple[str, str | None]:
|
||||
A tuple `(email, name)` where `email` is the sender email address
|
||||
and `name` is the display name, or `None` if unavailable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user