PATH:
opt
/
alt
/
python27
/
lib
/
python2.7
/
site-packages
/
pip
/
_internal
/
utils
"""Utilities for defining models """ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import operator class KeyBasedCompareMixin(object): """Provides comparison capabilities that is based on a key """ __slots__ = ['_compare_key', '_defining_class'] def __init__(self, key, defining_class): self._compare_key = key self._defining_class = defining_class def __hash__(self): return hash(self._compare_key) def __lt__(self, other): return self._compare(other, operator.__lt__) def __le__(self, other): return self._compare(other, operator.__le__) def __gt__(self, other): return self._compare(other, operator.__gt__) def __ge__(self, other): return self._compare(other, operator.__ge__) def __eq__(self, other): return self._compare(other, operator.__eq__) def __ne__(self, other): return self._compare(other, operator.__ne__) def _compare(self, other, method): if not isinstance(other, self._defining_class): return NotImplemented return method(self._compare_key, other._compare_key)
[-] typing.py
[edit]
[-] compat.py
[edit]
[-] logging.pyc
[edit]
[-] setuptools_build.py
[edit]
[-] subprocess.py
[edit]
[-] models.pyc
[edit]
[-] entrypoints.pyc
[edit]
[-] glibc.pyc
[edit]
[-] compat.pyc
[edit]
[-] datetime.pyc
[edit]
[-] temp_dir.py
[edit]
[-] misc.pyc
[edit]
[-] deprecation.pyc
[edit]
[-] filesystem.py
[edit]
[-] entrypoints.py
[edit]
[-] __init__.py
[edit]
[-] glibc.py
[edit]
[-] encoding.pyc
[edit]
[-] wheel.py
[edit]
[-] parallel.py
[edit]
[-] filesystem.pyc
[edit]
[-] encoding.py
[edit]
[-] virtualenv.pyc
[edit]
[+]
..
[-] typing.pyc
[edit]
[-] virtualenv.py
[edit]
[-] packaging.pyc
[edit]
[-] appdirs.py
[edit]
[-] misc.py
[edit]
[-] pkg_resources.pyc
[edit]
[-] subprocess.pyc
[edit]
[-] temp_dir.pyc
[edit]
[-] hashes.pyc
[edit]
[-] appdirs.pyc
[edit]
[-] hashes.py
[edit]
[-] packaging.py
[edit]
[-] compatibility_tags.py
[edit]
[-] filetypes.py
[edit]
[-] deprecation.py
[edit]
[-] urls.pyc
[edit]
[-] distutils_args.py
[edit]
[-] wheel.pyc
[edit]
[-] filetypes.pyc
[edit]
[-] setuptools_build.pyc
[edit]
[-] unpacking.pyc
[edit]
[-] unpacking.py
[edit]
[-] urls.py
[edit]
[-] datetime.py
[edit]
[-] pkg_resources.py
[edit]
[-] models.py
[edit]
[-] inject_securetransport.pyc
[edit]
[-] compatibility_tags.pyc
[edit]
[-] __init__.pyc
[edit]
[-] parallel.pyc
[edit]
[-] direct_url_helpers.py
[edit]
[-] logging.py
[edit]
[-] direct_url_helpers.pyc
[edit]
[-] inject_securetransport.py
[edit]
[-] distutils_args.pyc
[edit]