(value: Any)
| 130 | refs: list[str] = [] |
| 131 | |
| 132 | def push(value: Any) -> None: |
| 133 | if value is None: |
| 134 | return |
| 135 | if isinstance(value, dict): |
| 136 | for key in ("asset_ref", "assetRef", "src", "path", "storage_path", "storagePath", "ref"): |
| 137 | if key in value: |
| 138 | push(value.get(key)) |
| 139 | return |
| 140 | return |
| 141 | if isinstance(value, list): |
| 142 | for item in value: |
| 143 | push(item) |
| 144 | return |
| 145 | for part in re.split(r"[,\n]+", str(value)): |
| 146 | ref = _normalize_ref(part) |
| 147 | if ref and ref.lower() not in {"null", "none", "n/a"} and ref not in refs: |
| 148 | refs.append(ref) |
| 149 | |
| 150 | for key in ("asset_ref", "assetRef", "asset", "assets", "visual_assets", "visualAssets"): |
| 151 | push(page.get(key)) |
no test coverage detected