(self, idx)
| 61 | return len(self._tail) |
| 62 | |
| 63 | def __getitem__(self, idx): |
| 64 | if isinstance(idx, slice): |
| 65 | return tuple(self[i] for i in range(*idx.indices(len(self)))) |
| 66 | |
| 67 | if idx >= len(self) or idx < -len(self): |
| 68 | raise IndexError(idx) |
| 69 | if idx < 0: |
| 70 | idx += len(self) |
| 71 | return self._path._from_parsed_parts(self._drv, self._root, |
| 72 | self._tail[:-idx - 1]) |
| 73 | |
| 74 | def __repr__(self): |
| 75 | return "<{}.parents>".format(type(self._path).__name__) |
nothing calls this directly
no test coverage detected