8000 Update mypy to 0.730 (#839) · ag-python/pydantic@f6edb1e · GitHub
[go: up one dir, main page]

Skip to content

Commit f6edb1e

Browse files
dmontagusamuelcolvin
authored andcommitted
Update mypy to 0.730 (pydantic#839)
* Update mypy * Fix import sorting
1 parent 6320d8c commit f6edb1e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

pydantic/generics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any, ClassVar, Dict, Generic, Tuple, Type, TypeVar, Union, get_type_hints
22

3-
from pydantic import BaseModel, create_model
43
from pydantic.class_validators import gather_validators
4+
from pydantic.main import BaseModel, create_model
55

66
_generic_types_cache: Dict[Tuple[Type[Any], Union[Any, Tuple[Any, ...]]], Type[BaseModel]] = {}
77
GenericModelT = TypeVar('GenericModelT', bound='GenericModel')

pydantic/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def validate(cls, value: Any) -> Any:
238238

239239

240240
class ConstrainedNumberMeta(type):
241-
def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt':
241+
def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt': # type: ignore
242242
new_cls = cast('ConstrainedInt', type.__new__(cls, name, bases, dct))
243243

244244
if new_cls.gt is not None and new_cls.ge is not None:

tests/mypy/mypy-default.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ warn_redundant_casts = True
55
warn_unused_ignores = True
66
disallow_any_generics = True
77
check_untyped_defs = True
8-
no_implicit_reexport = True
8+
;no_implicit_reexport = True
99

1010
# for strict mypy: (this is the tricky one :-))
1111
disallow_untyped_defs = True

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Cython==0.29.13;sys_platform!='win32'
55
flake8==3.7.8
66
flake8-quotes==2.1.0
77
isort==4.3.21
8-
mypy==0.720
8+
mypy==0.730
99
pycodestyle==2.5.0
1010
pyflakes==2.1.1
1111
pytest==5.1.3

tests/test_mypy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@pytest.mark.skipif(not typing_extensions, reason='typing_extensions not installed')
3838
@pytest.mark.parametrize('filename,expected_result', expected_successes + expected_fails)
3939
def test_mypy_results(filename, expected_result):
40-
actual_result = api.run([filename, '--config-file', 'tests/mypy/mypy-default.ini'])
40+
actual_result = api.run([filename, '--config-file', 'tests/mypy/mypy-default.ini', '--no-error-summary'])
4141

4242
expected_out, expected_err, expected_returncode = expected_result
4343
actual_out, actual_err, actual_returncode = actual_result

0 commit comments

Comments
 (0)
0