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

Disallow use of ClassVar for TypedDict and NamedTuple attributes #9526

Closed
erictraut opened this issue Dec 1, 2024 · 1 comment
Closed

Disallow use of ClassVar for TypedDict and NamedTuple attributes #9526

erictraut opened this issue Dec 1, 2024 · 1 comment
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request spec compliance

Comments

@erictraut
Copy link
Collaborator

The runtime disallows the use of the ClassVar qualifier when defining a TypedDict and NamedTuple.

This doesn't strike me as a significant source of confusion or bugs, but it has been proposed to amend the typing spec to mandate that type checkers report this condition.

@erictraut erictraut added the enhancement request New feature or request label Dec 1, 2024
erictraut added a commit that referenced this issue Dec 3, 2024
…ple` or `TypedDict` attribute annotation. This addresses #9526.
erictraut added a commit that referenced this issue Dec 3, 2024
…ple` or `TypedDict` attribute annotation. This addresses #9526. (#9540)
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Dec 3, 2024
@erictraut
Copy link
Collaborator Author

This is addressed in pyright 1.1.390.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request spec compliance
Projects
None yet
Development

No branches or pull requests

1 participant