(value: str | Path)
| 2087 | return norm |
| 2088 | |
| 2089 | def source_identity(value: str | Path) -> Path: |
| 2090 | path = Path(value) |
| 2091 | if not path.is_absolute(): |
| 2092 | path = root_walked / path |
| 2093 | elif root_walked != root_resolved: |
| 2094 | normalized = _normalize_path(Path(os.path.abspath(path))) |
| 2095 | try: |
| 2096 | relative = normalized.relative_to(root_resolved) |
| 2097 | except ValueError: |
| 2098 | pass |
| 2099 | else: |
| 2100 | path = root_walked / relative |
| 2101 | return _normalize_path(Path(os.path.abspath(path))) |
| 2102 | |
| 2103 | return source_identity, normalize_value |
| 2104 |
no test coverage detected