Check argument types [arg-type]
Mypy checks that argument types in a call match the declared argumenttypes in the signature of the called function (if one exists).
Example:
- from typing import List, Optional
- def first(x: List[int]) -> Optional[int]:
- return x[0] if x else 0
- t = (5, 4)
- # Error: Argument 1 to "first" has incompatible type "Tuple[int, int]";
- # expected "List[int]" [arg-type]
- print(first(t))