pyright icon indicating copy to clipboard operation
pyright copied to clipboard

type error on `map`

Open uf-fipper opened this issue 6 months ago • 1 comments

Environment data

  • Pylance version: v2024.8.1
  • OS and version: win11
  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.4

Code Snippet

a: list[int | None] = [1, 2, 3, None]
b = map(lambda x: x or 0, a)

Expected behavior

type(b) == map[int]

Actual behavior

image

image

uf-fipper avatar Aug 08 '24 08:08 uf-fipper