提交 957756ac 编写于 作者: C Chris Jerdonek

Remove strict_optional=False for models/target_python.py.

上级 250efe5f
......@@ -59,9 +59,6 @@ strict_optional = False
[mypy-pip/_internal/models/link]
strict_optional = False
[mypy-pip/_internal/models/target_python]
strict_optional = False
[mypy-pip/_internal/operations/check]
strict_optional = False
......
......@@ -118,7 +118,7 @@ def get_pip_version():
def normalize_version_info(py_version_info):
# type: (Optional[Tuple[int, ...]]) -> Optional[Tuple[int, int, int]]
# type: (Tuple[int, ...]) -> Tuple[int, int, int]
"""
Convert a tuple of ints representing a Python version to one of length
three.
......@@ -129,9 +129,6 @@ def normalize_version_info(py_version_info):
:return: a tuple of length three if `py_version_info` is non-None.
Otherwise, return `py_version_info` unchanged (i.e. None).
"""
if py_version_info is None:
return None
if len(py_version_info) < 3:
py_version_info += (3 - len(py_version_info)) * (0,)
elif len(py_version_info) > 3:
......
......@@ -739,7 +739,6 @@ class TestGlibc(object):
@pytest.mark.parametrize('version_info, expected', [
(None, None),
((), (0, 0, 0)),
((3, ), (3, 0, 0)),
((3, 6), (3, 6, 0)),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册