Resolve decode_path to a ResolvedFile with file_path, extension, and optional temp path.
(decode_path: str)
| 117 | |
| 118 | |
| 119 | def _resolve_file(decode_path: str) -> ResolvedFile: |
| 120 | """Resolve decode_path to a ResolvedFile with file_path, extension, and optional temp path.""" |
| 121 | temp_download: str | None = None |
| 122 | if _is_url(decode_path): |
| 123 | file_path, ext = _download_to_temp(decode_path) |
| 124 | temp_download = file_path |
| 125 | else: |
| 126 | file_path = str(Path(decode_path).resolve()) |
| 127 | ext = _get_extension(file_path) |
| 128 | return ResolvedFile( |
| 129 | file_path=file_path, extension=ext, temp_download_path=temp_download |
| 130 | ) |
| 131 | |
| 132 | |
| 133 | def _print_pixel_table(pixels: list[list[int]]) -> None: |
no test coverage detected