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

mypy allows TypedDict classes with metaclasses #16432

Closed
sobolevn opened this issue Nov 9, 2023 · 1 comment
Closed

mypy allows TypedDict classes with metaclasses #16432

sobolevn opened this issue Nov 9, 2023 · 1 comment
Assignees
Labels
bug mypy got something wrong topic-typed-dict

Comments

@sobolevn
Copy link
Member

sobolevn commented Nov 9, 2023

from typing import TypedDict

class A(type): ...

class Foo(TypedDict, metaclass=A):
   x: int

This code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/

Specifying a metaclass is not allowed.

I am working on a PR.

@sobolevn sobolevn added bug mypy got something wrong topic-typed-dict labels Nov 9, 2023
@sobolevn sobolevn self-assigned this Nov 9, 2023
@sobolevn
Copy link
Member Author

Closed by #16438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-typed-dict
Projects
None yet
Development

No branches or pull requests

1 participant