diff options
author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py | |
parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py deleted file mode 100644 index 4e25ae6..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/typing.py +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | """For neatly implementing static typing in pip. | ||
2 | |||
3 | `mypy` - the static type analysis tool we use - uses the `typing` module, which | ||
4 | provides core functionality fundamental to mypy's functioning. | ||
5 | |||
6 | Generally, `typing` would be imported at runtime and used in that fashion - | ||
7 | it acts as a no-op at runtime and does not have any run-time overhead by | ||
8 | design. | ||
9 | |||
10 | As it turns out, `typing` is not vendorable - it uses separate sources for | ||
11 | Python 2/Python 3. Thus, this codebase can not expect it to be present. | ||
12 | To work around this, mypy allows the typing import to be behind a False-y | ||
13 | optional to prevent it from running at runtime and type-comments can be used | ||
14 | to remove the need for the types to be accessible directly during runtime. | ||
15 | |||
16 | This module provides the False-y guard in a nicely named fashion so that a | ||
17 | curious maintainer can reach here to read this. | ||
18 | |||
19 | In pip, all static-typing related imports should be guarded as follows: | ||
20 | |||
21 | from pip.utils.typing import MYPY_CHECK_RUNNING | ||
22 | |||
23 | if MYPY_CHECK_RUNNING: | ||
24 | from typing import ... | ||
25 | |||
26 | Ref: https://github.com/python/mypy/issues/3216 | ||
27 | """ | ||
28 | |||
29 | MYPY_CHECK_RUNNING = False | ||