Make the mypy strict_optional exemptions explicit.
@@ -25,11 +25,97 @@ ignore = W504
[mypy]
follow_imports = silent
ignore_missing_imports = True
+
+[mypy-pip/_internal/build_env]
+strict_optional = False
+
+[mypy-pip/_internal/cache]
+strict_optional = False
+
+[mypy-pip/_internal/cli/base_command]
+strict_optional = False
+
+[mypy-pip/_internal/cli/cmdoptions]
+strict_optional = False
+
+[mypy-pip/_internal/configuration]
+strict_optional = False
+
+[mypy-pip/_internal/download]
+strict_optional = False
+
+[mypy-pip/_internal/index]
+strict_optional = False
+
+[mypy-pip/_internal/legacy_resolve]
+strict_optional = False
+
+[mypy-pip/_internal/locations]
+strict_optional = False
+
+[mypy-pip/_internal/models/format_control]
+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
+
+[mypy-pip/_internal/operations/freeze]
+strict_optional = False
+
+[mypy-pip/_internal/operations/prepare]
+strict_optional = False
+
+[mypy-pip/_internal/pep425tags]
strict_optional = False
[mypy-pip/_internal/req/*]
disallow_untyped_defs = True
+[mypy-pip/_internal/req]
+strict_optional = False
+
+[mypy-pip/_internal/req/constructors]
+strict_optional = False
+
+[mypy-pip/_internal/req/req_file]
+strict_optional = False
+
+[mypy-pip/_internal/req/req_install]
+strict_optional = False
+
+[mypy-pip/_internal/req/req_set]
+strict_optional = False
+
+[mypy-pip/_internal/req/req_tracker]
+strict_optional = False
+
+[mypy-pip/_internal/utils/encoding]
+strict_optional = False
+
+[mypy-pip/_internal/utils/glibc]
+strict_optional = False
+
+[mypy-pip/_internal/utils/logging]
+strict_optional = False
+
+[mypy-pip/_internal/utils/misc]
+strict_optional = False
+
+[mypy-pip/_internal/utils/ui]
+strict_optional = False
+
+[mypy-pip/_internal/vcs/subversion]
+strict_optional = False
+
+[mypy-pip/_internal/wheel]
+strict_optional = False
+
[mypy-pip/_vendor/*]
follow_imports = skip
ignore_errors = True
