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 would expect this to report no type errors, but instead I get:
error: Argument 1 to "a_func" has incompatible type "**Dict[str, int]"; expected "Optional[str]"
Is there a way to get this to pass mypy checking? My real code involves passing a dynamic kwarg (like year, month, or week) along with a length to create several differentdateutil.relativedelta instances so rewriting it to not use ** would involve rewriting the real code to have a large number of conditionals.
The text was updated successfully, but these errors were encountered:
This is a bug report present in mypy 0.720 (currently lastest mypy).
I get an unexpected type error when trying to pass
**
keyword args to a function with multiple optional arguments of different types.Take this example code:
I would expect this to report no type errors, but instead I get:
Is there a way to get this to pass mypy checking? My real code involves passing a dynamic kwarg (like
year
,month
, orweek
) along with a length to create several differentdateutil.relativedelta
instances so rewriting it to not use**
would involve rewriting the real code to have a large number of conditionals.The text was updated successfully, but these errors were encountered: