Add mypy configuration file with explicit options
This allows text editors, standalone `mypy` runs, etc. to get the correct configuration
MODIFY
noxfile.py
noxfile.py
@@ -156,7 +156,7 @@ def mypy(session):
session.install("idna>=2.0.0")
session.install("cryptography>=1.3.4")
session.run("mypy", "--version")
- session.run("mypy", "--strict", "src/urllib3")
+ session.run("mypy", "src/urllib3")
@nox.session

MODIFY
setup.cfg
setup.cfg
@@ -24,3 +24,21 @@ python_classes = Test *TestCase
[isort]
profile=black
+
+[mypy]
+mypy_path = src
+check_untyped_defs = True
+disallow_any_generics = True
+disallow_incomplete_defs = True
+disallow_subclassing_any = True
+disallow_untyped_calls = True
+disallow_untyped_decorators = True
+disallow_untyped_defs = True
+no_implicit_optional = True
+no_implicit_reexport = True
+show_error_codes = True
+strict_equality = True
+warn_redundant_casts = True
+warn_return_any = True
+warn_unused_configs = True
+warn_unused_ignores = True

Add mypy configuration file with explicit options

This allows text editors, standalone `mypy` runs, etc. to get the correct configuration