-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-2-lowtopic-type-contextType context / bidirectional inferenceType context / bidirectional inference
Description
Using mypy-0.770 with no additional flags
from decimal import Decimal
foo = [Decimal("1"), Decimal("2")]
sum(foo)
sum(foo) + sum(foo)
The first sum
statement is okay, but the second is an error: Argument 1 to "sum" has incompatible type "List[Decimal]"; expected "Iterable[int]" [arg-type]
ncvc
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-2-lowtopic-type-contextType context / bidirectional inferenceType context / bidirectional inference