(path, start=os.curdir)
| 220 | |
| 221 | |
| 222 | def relpath(path, start=os.curdir): |
| 223 | path = os.path.abspath(os.fspath(path)) |
| 224 | start = os.path.abspath(os.fspath(start)) |
| 225 | |
| 226 | # Windows path on different drive than curdir doesn't have relpath |
| 227 | if os.name == "nt" and not os.path.commonprefix([start, path]): |
| 228 | return path |
| 229 | |
| 230 | return os.path.relpath(path, start) |
| 231 | |
| 232 | |
| 233 | def as_posix(path: str) -> str: |