Return a stripped integration key, or None for empty/non-string values.
(key: Any)
| 103 | |
| 104 | |
| 105 | def clean_integration_key(key: Any) -> str | None: |
| 106 | """Return a stripped integration key, or None for empty/non-string values.""" |
| 107 | if not isinstance(key, str) or not key.strip(): |
| 108 | return None |
| 109 | return key.strip() |
| 110 | |
| 111 | |
| 112 | def dedupe_integration_keys(keys: list[Any]) -> list[str]: |
no outgoing calls
no test coverage detected