-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[Regression 1.6.x -> 1.7] Invalid "Returning Any from function declared..." #16499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
OK, the problem is that FWIW there is an easy fix, use def _binary_op(self,
op: object, # <-- here
other: ArrayOrScalar,
) -> Array:
return Array() this fixes the problem |
Thanks for responding! I agree that the workaround you provide does address the issue for the reproducer I provided, however unfortunately that is not the case in the full-scale code from which the reproducer is derived. Specifically I am talking about this error:
being reported for this commit of the full-scale thing: I have not yet succeeded in making a smaller reproducer that still shows the issue. |
FWIW, the corresponding bits of the full-scale code are here: for the call to for the affected call site being reported. |
To Reproduce
Expected Behavior
Type-checks correctly, as it does with 1.6.1.
Actual Behavior
Your Environment
--strict
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: