Skip to content

collections.namedtuple inferred as type tuple and not the (user-defined) class #3394

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
AbhijeetKrishnan opened this issue Oct 21, 2019 · 1 comment

Comments

@AbhijeetKrishnan
Copy link

Reference: pandas-dev/pandas#29114 (comment)

collections.namedtuple() should have its type inferred as the user-supplied argument. Instead, its type is inferred as tuple.

@srittau
Copy link
Collaborator

srittau commented Oct 21, 2019

namedtuple is special cased by type checkers. I am not sure that its definition can be improved in typeshed. But if you have good ideas, please submit a PR and we will have a look at it. In the meantime I am going to close this issue.

@srittau srittau closed this as completed Oct 21, 2019
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