Skip to content

set.union not working correctly #2013

Closed
@za3k

Description

@za3k

Code:
a = set().union(*[[1],[2],[3]]) # type: Set[int]

Expected:This should work fine
Result:

error: Argument 1 to "union" of "set" has incompatible type *List[List[int]]; expected Iterable[None]
error: Incompatible types in assignment (expression has type Set[None], variable has type Set[int])

I'm fairly new to mypy, so please let me know if this is user error.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions