Using starlette 's URLPath and URL classes from starlette.datastructures , implement a utility called…
Using starlette 's URLPath and URL classes from starlette.datastructures , implement a utility called…: a task in repo2rlenv-code-instruct (Harbor dataset). URLPathCollection must support: 1. Adding named URL paths via add(name: str, path: str, protocol: str = "", host: str = "") . 2. Retrieving a…
The task
`URLPathCollection` must support: 1. **Adding** named URL paths via `add(name: str, path: str, protocol: str = "", host: str = "")`. 2. **Retrieving** a `URLPath` by name via `get(name: str) -> URLPath`. 3. **Resolving** a named path to an absolute URL via `resolve(name: str, base_url: str) -> str`, which calls…
Part of FineEnvs/repo2rlenv-code-instruct.