Skip to content
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

Builtin sequence types don't work as constructors with map #4584

Closed
Dentosal opened this issue Feb 17, 2018 · 2 comments
Closed

Builtin sequence types don't work as constructors with map #4584

Dentosal opened this issue Feb 17, 2018 · 2 comments
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-1-normal

Comments

@Dentosal
Copy link

Dentosal commented Feb 17, 2018

This is a bug report.

Minimal reproducible example

map(list, [[1]])

Expected behavior

No error message, returns [[1]]

Actual behavior

error: Argument 1 to "map" has incompatible type "Type[List[Any]]"; expected "Callable[[List[int]], List[_T]]"

Versions

$ python --version
Python 3.6.2
$ python -m mypy --version
mypy 0.570-dev-c25dd085a78047a9d5e0909261e8261506505d35

(Also tested with mypy 0.560)

@gvanrossum gvanrossum added the bug mypy got something wrong label Feb 17, 2018
@ilevkivskyi ilevkivskyi added priority-1-normal false-positive mypy gave an error on correct code labels May 19, 2018
@WillAyd
Copy link

WillAyd commented Oct 16, 2019

Probably related to #6697

@ilevkivskyi
Copy link
Member

Yes, this is essentially a duplicate of #6697

Also, both issues are essentially caused by #1317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-1-normal
Projects
None yet
Development

No branches or pull requests

4 participants