(raw: dict[str, Any])
| 90 | |
| 91 | |
| 92 | def _sanitize_primary(raw: dict[str, Any]) -> PrimaryConnection: |
| 93 | primary = raw.get("primary") |
| 94 | if not isinstance(primary, dict): |
| 95 | return PrimaryConnection() |
| 96 | return PrimaryConnection( |
| 97 | upstream=_clean_text(primary.get("upstream")), |
| 98 | api_key=_clean_text(primary.get("api_key")), |
| 99 | ) |
| 100 | |
| 101 | |
| 102 | def mask_api_key(api_key: str) -> str: |
no test coverage detected