You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following test-case inspired by real code similar to x and func.
fromtypingimportOptionalx=dict(a=5, b=None)
y=dict(a=5, b=6)
deffunc(*, a: int, b: Optional[int]) ->None:
print(a, b)
deffunc2(*, a: Optional[int], b: Optional[int]) ->None:
print(a, b)
func(**x) # Only call to fail mypy; expect this to pass, or is extra annotation needed?func(**y)
func2(**x)
func2(**y)
Output:
error: Argument 1 to "func" has incompatible type "**Dict[str, Optional[int]]"; expected "int"
Version 0.641, extensions 0.4.1. No explicit flags.
The text was updated successfully, but these errors were encountered:
I have the following test-case inspired by real code similar to
x
andfunc
.Output:
Version 0.641, extensions 0.4.1. No explicit flags.
The text was updated successfully, but these errors were encountered: