Skip to content

mypy allows TypedDict classes with metaclasses #16432

Closed

Description

@sobolevn
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.

Activity

  1. added
    bug
    on Nov 9, 2023
  2. self-assigned this
    on Nov 9, 2023
  3. sobolevn commented on Nov 18, 2023

    @sobolevn
    MemberAuthor

    Closed by #16438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugtopic-typed-dict

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions