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
float return type would be technically true, but that would cause a lot of issues with code that (correctly) wants to assume that x ** y is an integer. The convention in typeshed is to use Any as the return type if the return type depends on the value (not the type) of an argument. If you want a precise type, you can create a helper function (or alias pow) and explicitly annotate it.
Using mypy 0.660 and Python 3.7, running
mypy --warn-return-any
on:returns
This only occurs when there's the exponentiation (
**
) in the lambda: if I change it to a+
or*
.The text was updated successfully, but these errors were encountered: