(record: dict[str, Any])
| 73 | |
| 74 | |
| 75 | def resolve_pdf_path(record: dict[str, Any]) -> Path | None: |
| 76 | for key in ("pdf_path", "local_pdf_path"): |
| 77 | value = normalize_whitespace(str(record.get(key, ""))) |
| 78 | if not value: |
| 79 | continue |
| 80 | path = Path(value).expanduser() |
| 81 | if path.exists() and path.is_file(): |
| 82 | return path.resolve() |
| 83 | return None |
| 84 | |
| 85 | |
| 86 | def section_id(base: str, seen: dict[str, int]) -> str: |
no test coverage detected