Strip leading parent dir references, if any.
(path: AnyPurePath)
| 52 | |
| 53 | @staticmethod |
| 54 | def __strip_parent_refs(path: AnyPurePath) -> AnyPurePath: |
| 55 | """Strip leading parent dir references, if any. |
| 56 | """ |
| 57 | |
| 58 | if path.parts: |
| 59 | pardir = r'..' |
| 60 | |
| 61 | while path.parts[0] == pardir: |
| 62 | path = path.relative_to(pardir) |
| 63 | |
| 64 | return path |
| 65 | |
| 66 | @property |
| 67 | def root(self) -> str: |
no outgoing calls
no test coverage detected