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