/usr/local/lib/python3.6/site-packages/pip/_internal/utils
NameSizeModeActions
__pycache__/-0755rm
appdirs.py16650644editdlrm
compat.py18840644editdlrm
compatibility_tags.py53770644editdlrm
datetime.py2420644editdlrm
deprecation.py36270644editdlrm
direct_url_helpers.py32060644editdlrm
distutils_args.py12490644editdlrm
egg_link.py22030644editdlrm
encoding.py11690644editdlrm
entrypoints.py10550644editdlrm
filesystem.py58930644editdlrm
filetypes.py7160644editdlrm
glibc.py31100644editdlrm
hashes.py48110644editdlrm
inject_securetransport.py7950644editdlrm
logging.py115320644editdlrm
misc.py204320644editdlrm
models.py11930644editdlrm
packaging.py29520644editdlrm
parallel.py31960644editdlrm
pkg_resources.py9870644editdlrm
setuptools_build.py46970644editdlrm
subprocess.py100580644editdlrm
temp_dir.py76620644editdlrm
unpacking.py89060644editdlrm
urls.py17590644editdlrm
virtualenv.py34590644editdlrm
wheel.py61630644editdlrm
_log.py10150644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/pip/_internal/utils/models.py (1193B)
"""Utilities for defining models """ import operator from typing import Any, Callable, Type class KeyBasedCompareMixin: """Provides comparison capabilities that is based on a key""" __slots__ = ["_compare_key", "_defining_class"] def __init__(self, key: Any, defining_class: Type["KeyBasedCompareMixin"]) -> None: self._compare_key = key self._defining_class = defining_class def __hash__(self) -> int: return hash(self._compare_key) def __lt__(self, other: Any) -> bool: return self._compare(other, operator.__lt__) def __le__(self, other: Any) -> bool: return self._compare(other, operator.__le__) def __gt__(self, other: Any) -> bool: return self._compare(other, operator.__gt__) def __ge__(self, other: Any) -> bool: return self._compare(other, operator.__ge__) def __eq__(self, other: Any) -> bool: return self._compare(other, operator.__eq__) def _compare(self, other: Any, method: Callable[[Any, Any], bool]) -> bool: if not isinstance(other, self._defining_class): return NotImplemented return method(self._compare_key, other._compare_key)