-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
Bug Report
On v1.15.0, with mypy --warn-unreachable ...
successfully finds no errors with
import re
re.sub("x", lambda m: m.group().count("x") * "x", "x")
but reports an error with
import re
for _ in re.findall("x", "x"):
re.sub("x", lambda m: m.group().count("x") * "x", "x") # E: Argument 1 to "count" of "bytes" has incompatible type "str"; expected "Buffer | SupportsIndex" [arg-type]
for reference, both examples pass with v1.14.1 and with v1.15.0 without --warn-unreachable
.
sterliakov
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong