KEMBAR78
stubgen: Use NamedTuple class syntax by srittau · Pull Request #10625 · python/mypy · GitHub
Skip to content

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Jun 10, 2021

Description

Use typing.NamedTuple in stubgen, instead of collections.namedtuple.

Test Plan

I modified the existing tests and added another test for an empty namedtuple, to ensure that Any is not imported unnecessarily.

@JelleZijlstra JelleZijlstra merged commit 7e1eb3c into python:master Jun 10, 2021
@srittau srittau deleted the stubgen-namedtuple branch June 10, 2021 22:38
@srittau srittau mentioned this pull request Jun 11, 2021
JukkaL pushed a commit that referenced this pull request Jun 21, 2021
### Description

Use `typing.NamedTuple` in stubgen, instead of `collections.namedtuple`.

## Test Plan

I modified the existing tests and added another test for an empty namedtuple, to ensure that `Any` is not imported unnecessarily.
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

Successfully merging this pull request may close these issues.

2 participants