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
The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a ValueError is raised.
Bug Report
Mypy gives
[index]
error forkey
when callingmin
from function that is declared to returnOptional
.To Reproduce
This pretty valid
returns error
Changing default to
0
doesn't fix the problem, but changing return type offunc
toint
does. So, the following works fine:Expected Behavior
No error for the first example, as
default
is never compared to objects in collection.Actual Behavior
Your Environment
mypy.ini
(and other config files): noThe text was updated successfully, but these errors were encountered: