Skip to content

Fix __init_subclass__ type check - #7723

Merged
msullivan merged 1 commit into
python:masterfrom
ilevkivskyi:fix-typeddict-init-subclass
Oct 16, 2019
Merged

Fix __init_subclass__ type check#7723
msullivan merged 1 commit into
python:masterfrom
ilevkivskyi:fix-typeddict-init-subclass

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes#7722

This skips checking class keywords against __init_subclass__ for:

  • Classes with custom metaclasses, because they can pop the keywords before calling super().
  • Classes that are special forms, like TypedDict etc.

@msullivan

Copy link
Copy Markdown
Collaborator

Yeah, good catch. This will get cherry picked.

@msullivan
msullivan merged commit 222b14d into python:masterOct 16, 2019
msullivan pushed a commit that referenced this pull request Oct 16, 2019
Sign up for freeto 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.

Regression: false positive when creating a TypedDict with total=False

2 participants

@ilevkivskyi@msullivan