| 64 | |
| 65 | |
| 66 | class SitePackagesDir(object): |
| 67 | def __init__(self, path): |
| 68 | # type: (str) -> None |
| 69 | self._path = os.path.realpath(path) |
| 70 | |
| 71 | @property |
| 72 | def path(self): |
| 73 | # type: () -> str |
| 74 | return self._path |
| 75 | |
| 76 | def __repr__(self): |
| 77 | # type: () -> str |
| 78 | return "{class_name}({path})".format(class_name=self.__class__.__name__, path=self._path) |
| 79 | |
| 80 | def __eq__(self, other): |
| 81 | # type: (Any) -> bool |
| 82 | return type(self) is type(other) and self._path == other._path |
| 83 | |
| 84 | def __ne__(self, other): |
| 85 | # type: (Any) -> bool |
| 86 | return not self == other |
| 87 | |
| 88 | def __hash__(self): |
| 89 | # type: () -> int |
| 90 | return hash((type(self), self._path)) |
| 91 | |
| 92 | |
| 93 | class Purelib(SitePackagesDir): |
no outgoing calls
no test coverage detected