(workspace_path: str)
| 143 | |
| 144 | |
| 145 | def _validate_workspace_path(workspace_path: str) -> str: |
| 146 | value = str(workspace_path) |
| 147 | normalized = value.replace("\\", "/") |
| 148 | parts = normalized.split("/") |
| 149 | if ( |
| 150 | not value |
| 151 | or value.startswith(("/", "\\")) |
| 152 | or urllib.parse.urlparse(value).scheme |
| 153 | or any(part == ".." for part in parts) |
| 154 | or any(_is_windows_drive_component(part) for part in parts) |
| 155 | ): |
| 156 | raise ModlyCliError(f"Invalid workspace path: {workspace_path}", code="INVALID_WORKSPACE_PATH") |
| 157 | return value |
| 158 | |
| 159 | |
| 160 | def _export_workspace_path(base_url: str, workspace_path: str, fmt: str, dest: Path, *, timeout: float) -> int: |
no test coverage detected