Update mypy to 0.730 (#839)

* Update mypy

* Fix import sorting
This commit is contained in:
dmontagu
2019-09-30 04:14:05 -07:00
committed by Samuel Colvin
parent 6320d8ca7c
commit f6edb1ef01
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
from typing import Any, ClassVar, Dict, Generic, Tuple, Type, TypeVar, Union, get_type_hints
from pydantic import BaseModel, create_model
from pydantic.class_validators import gather_validators
from pydantic.main import BaseModel, create_model
_generic_types_cache: Dict[Tuple[Type[Any], Union[Any, Tuple[Any, ...]]], Type[BaseModel]] = {}
GenericModelT = TypeVar('GenericModelT', bound='GenericModel')
+1 -1
View File
@@ -238,7 +238,7 @@ class PyObject:
class ConstrainedNumberMeta(type):
def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt':
def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt': # type: ignore
new_cls = cast('ConstrainedInt', type.__new__(cls, name, bases, dct))
if new_cls.gt is not None and new_cls.ge is not None:
+1 -1
View File
@@ -5,7 +5,7 @@ warn_redundant_casts = True
warn_unused_ignores = True
disallow_any_generics = True
check_untyped_defs = True
no_implicit_reexport = True
;no_implicit_reexport = True
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = True
+1 -1
View File
@@ -5,7 +5,7 @@ Cython==0.29.13;sys_platform!='win32'
flake8==3.7.8
flake8-quotes==2.1.0
isort==4.3.21
mypy==0.720
mypy==0.730
pycodestyle==2.5.0
pyflakes==2.1.1
pytest==5.1.3
+1 -1
View File
@@ -37,7 +37,7 @@ expected_successes = [('tests/mypy/success.py', ('', '', 0))]
@pytest.mark.skipif(not typing_extensions, reason='typing_extensions not installed')
@pytest.mark.parametrize('filename,expected_result', expected_successes + expected_fails)
def test_mypy_results(filename, expected_result):
actual_result = api.run([filename, '--config-file', 'tests/mypy/mypy-default.ini'])
actual_result = api.run([filename, '--config-file', 'tests/mypy/mypy-default.ini', '--no-error-summary'])
expected_out, expected_err, expected_returncode = expected_result
actual_out, actual_err, actual_returncode = actual_result