Skip to content
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

Example in dataclass documentation is incorrectly typed #98576

Closed
hauntsaninja opened this issue Oct 23, 2022 · 1 comment
Closed

Example in dataclass documentation is incorrectly typed #98576

hauntsaninja opened this issue Oct 23, 2022 · 1 comment
Labels
docs Documentation in the Doc dir topic-typing

Comments

@hauntsaninja
Copy link
Contributor

hauntsaninja commented Oct 23, 2022

The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: python/mypy#13934

@hauntsaninja hauntsaninja added the docs Documentation in the Doc dir label Oct 23, 2022
hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue Oct 23, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 31, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 31, 2022
miss-islington added a commit that referenced this issue Oct 31, 2022
(cherry picked from commit 880bafc)

Co-authored-by: Shantanu <[email protected]>
miss-islington added a commit that referenced this issue Oct 31, 2022
(cherry picked from commit 880bafc)

Co-authored-by: Shantanu <[email protected]>
@AlexWaygood
Copy link
Member

Fixed on main, and backported to the 3.11 and 3.10 branches.

Thanks @hauntsaninja for the PR, and thanks @Kentzo for originally pointing out the problem over at mypy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-typing
Projects
None yet
Development

No branches or pull requests

2 participants