(path: str)
| 1824 | |
| 1825 | |
| 1826 | def _normalize_frontend_path(path: str) -> str: |
| 1827 | if not path: |
| 1828 | raise AssertionError("A frontend path cannot be empty") |
| 1829 | if not path.startswith("/"): |
| 1830 | raise AssertionError("A frontend path must start with '/'") |
| 1831 | if path != "/": |
| 1832 | path = path.rstrip("/") |
| 1833 | return path |
| 1834 | |
| 1835 | |
| 1836 | def _join_frontend_paths(prefix: str, path: str) -> str: |