(value: Any)
| 591 | |
| 592 | def _parse_jsonish_list(value: Any) -> List[str]: |
| 593 | if isinstance(value, list): |
| 594 | return [str(item).strip() for item in value if str(item).strip()] |
| 595 | if not value: |
| 596 | return [] |
| 597 | if isinstance(value, str): |
| 598 | text = value.strip() |
| 599 | if not text: |
| 600 | return [] |
| 601 | try: |
| 602 | parsed = json.loads(text) |
| 603 | except json.JSONDecodeError: |
| 604 | return [text] |
| 605 | if isinstance(parsed, list): |
| 606 | return [str(item).strip() for item in parsed if str(item).strip()] |
| 607 | return [str(parsed).strip()] if parsed else [] |
| 608 | return [str(value).strip()] |
| 609 | |
| 610 | |
| 611 | def _clean_text(text: Any) -> str: |
| 612 | normalized = str(text or "") |
no outgoing calls
no test coverage detected