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
In the below example (playground gist), mypy behaves differently with respect to **kwargs:
deffunc(x: bool=False, **kwargs):
print(x, kwargs)
# This is accepted by mypy.func(y="y")
# This is flagged by mypy.data= {"y": "y"}
func(**data)
The error is Argument 1 to "func" has incompatible type "**dict[str, str]"; expected "bool" [arg-type]. This is incorrect because the function has **kwargs, so the dict / function call should be considered type correct.
Your Environment:
Mypy version used: latest (1.11.1)
Mypy command-line flags: -
Mypy configuration options from mypy.ini (and other config files): -
Python version used: 3.12
The text was updated successfully, but these errors were encountered:
Bug Report:
In the below example (playground gist), mypy behaves differently with respect to
**kwargs
:The error is
Argument 1 to "func" has incompatible type "**dict[str, str]"; expected "bool" [arg-type]
. This is incorrect because the function has**kwargs
, so the dict / function call should be considered type correct.Your Environment:
mypy.ini
(and other config files): -The text was updated successfully, but these errors were encountered: