(
existing_cookie_header: Optional[str],
extra_cookies: Optional[Dict[str, Any]],
)
| 253 | |
| 254 | @staticmethod |
| 255 | def _merge_cookie_header( |
| 256 | existing_cookie_header: Optional[str], |
| 257 | extra_cookies: Optional[Dict[str, Any]], |
| 258 | ) -> Optional[str]: |
| 259 | cookie_items: Dict[str, str] = {} |
| 260 | raw_existing = str(existing_cookie_header or "").strip() |
| 261 | if raw_existing: |
| 262 | for part in raw_existing.split(";"): |
| 263 | item = str(part or "").strip() |
| 264 | if not item or "=" not in item: |
| 265 | continue |
| 266 | key, value = item.split("=", 1) |
| 267 | key = str(key or "").strip() |
| 268 | value = str(value or "").strip() |
| 269 | if key: |
| 270 | cookie_items[key] = value |
| 271 | |
| 272 | if isinstance(extra_cookies, dict): |
| 273 | for key, value in extra_cookies.items(): |
| 274 | normalized_key = str(key or "").strip() |
| 275 | normalized_value = str(value or "").strip() |
| 276 | if normalized_key and normalized_value and normalized_key not in cookie_items: |
| 277 | cookie_items[normalized_key] = normalized_value |
| 278 | |
| 279 | if not cookie_items: |
| 280 | return raw_existing or None |
| 281 | return "; ".join(f"{key}={value}" for key, value in cookie_items.items()) |
| 282 | |
| 283 | def _build_flow_project_page_url(self, project_id: str) -> str: |
| 284 | return f"https://labs.google/fx/tools/flow/project/{project_id}" |
no outgoing calls
no test coverage detected