Skip to content

Incorrect type of starred argument in function definition #511

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

Closed
spkersten opened this issue Dec 6, 2014 · 2 comments
Closed

Incorrect type of starred argument in function definition #511

spkersten opened this issue Dec 6, 2014 · 2 comments

Comments

@spkersten
Copy link
Contributor

The type of the starred argument is incorrectly inferred to be a List instead of a Tuple. For example:

def f(*y: int) -> None:
    p = 1, 2
    p = y

mypy incorrectly reports:

line 3: Incompatible types in assignment (expression has type List[int], variable has type "Tuple[int, int]")

See documentation.

@spkersten
Copy link
Contributor Author

This is a duplicate of #261.

@JukkaL
Copy link
Collaborator

JukkaL commented Dec 7, 2014

Closing as duplicate.

@JukkaL JukkaL closed this as completed Dec 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants