pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

[Bug] map() doesn't work

Open stroxler opened this issue 8 months ago • 0 comments

Describe the Bug

It's probably similar to #173 about zip(), but in this case the error happens directly on the call to map and is pretty hard to read. On this snippet in mypy_primer

map(line_count, paths)

I got

No matching overload found for function `map.__new__`, reporting errors for closest overload: `(Unknown, (Any) -> Literal[-20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25] | bool, Iterable[Any]) -> Self@map`Pyrefly(no-matching-overload)

Codebase

I was working on mypy_primer, this is occurring in the coverage function of main.py

stroxler avatar May 08 '25 20:05 stroxler