-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
builtins.sum
: Items in the iterable must support addition with int
if no start
value is given
#8000
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
Conversation
…t` value is given
# TODO: these pass pyright with the current stubs, but mypy erroneously emits an error: | ||
# sum([3, Fraction(7, 22), complex(8, 0), 9.83]) | ||
# sum([3, Decimal('0.98')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy also emits an error for these tests on current master, so this PR wouldn't be introducing a regression here.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Any thoughts from anyone on whether this is a good idea? :) |
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This just found a bug where we were doing |
Closes #7574 (cc. @jpy-git). I think this is just about the best we can do without introducing many false-positive errors.