Skip to content

List[<nothing>] error #3283

Open
Open
@jcrmatos

Description

@jcrmatos

Hello,

Already showed this in Gitter and was told to open the issue here.
My env is Win7P+SP1 x64, Py 3.5.2 32b and mypy 0.501.

I have the following situation:

With the following code mypy doesn't return an error (which is correct):

from datetime import datetime, timedelta

data_dic = {idx: []
            for idx in range(len(lcl.msgs['DATA_COL_NAMES']) - 1)}  # type: Dict[int, List[Union[datetime, float]]]

But with the following code mypy returns a strange error

from datetime import datetime, timedelta

data_dic = {idx: []
            for idx in range(len(lcl.msgs['DATA_COL_NAMES']) - 1)}  # type: Dict[int, Union[List[datetime], List[float]]]

rtg_main.py:197: error: Value expression in dictionary comprehension has incompatible type List[<uninhabited>]; expected type "Union[List[datetime], List[float]]"

Best regards,

JM

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions