Skip to content

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

Closed
@Dentosal

Description

@Dentosal

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions