Skip to content

Commit ef95ef4

Browse files
committed
Fix tests for mypy==0.990
Mypy as of 0.990 has turned on the --show-error-codes option by default.
1 parent c7d684b commit ef95ef4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_mypy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
mypy_config: |
66
follow_imports = silent
77
plugins = marshmallow_dataclass.mypy
8+
show_error_codes = true
89
env:
910
- PYTHONPATH=.
1011
main: |
@@ -24,8 +25,8 @@
2425
reveal_type(user.id) # N: Revealed type is "builtins.str"
2526
reveal_type(user.email) # N: Revealed type is "builtins.str"
2627
27-
User(id=42, email="user@email.com") # E: Argument "id" to "User" has incompatible type "int"; expected "str"
28-
User(id="a"*32, email=["not", "a", "string"]) # E: Argument "email" to "User" has incompatible type "List[str]"; expected "str"
28+
User(id=42, email="user@email.com") # E: Argument "id" to "User" has incompatible type "int"; expected "str" [arg-type]
29+
User(id="a"*32, email=["not", "a", "string"]) # E: Argument "email" to "User" has incompatible type "List[str]"; expected "str" [arg-type]
2930
- case: marshmallow_dataclass_keyword_arguments
3031
mypy_config: |
3132
follow_imports = silent
@@ -45,6 +46,7 @@
4546
mypy_config: |
4647
follow_imports = silent
4748
plugins = marshmallow_dataclass.mypy
49+
show_error_codes = true
4850
env:
4951
- PYTHONPATH=.
5052
main: |
@@ -62,4 +64,4 @@
6264
reveal_type(website.url) # N: Revealed type is "builtins.str"
6365
reveal_type(website.email) # N: Revealed type is "builtins.str"
6466
65-
Website(url=42, email="user@email.com") # E: Argument "url" to "Website" has incompatible type "int"; expected "str"
67+
Website(url=42, email="user@email.com") # E: Argument "url" to "Website" has incompatible type "int"; expected "str" [arg-type]

0 commit comments

Comments
 (0)