Fix crash on invalid enum in method by ilevkivskyi · Pull Request #16511 · python/mypy

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@ilevkivskyi

Copy link Copy Markdown

Member

Fixes #16163

Fix is straightforward: I simply copy the logic we have for invalid TypedDicts/NamedTuples.

@github-actions

Copy link Copy Markdown

Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

discord.py (https://github.com/Rapptz/discord.py): typechecking got 1.10x faster (196.2s -> 178.3s)
(Performance measurements are based on a single noisy sample)

@ilevkivskyi ilevkivskyi merged commit 5489fd3 into python:master

Nov 17, 2023

@ilevkivskyi ilevkivskyi deleted the fix-enum-crash branch

November 17, 2023 20:49

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

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes

@JukkaL JukkaL Awaiting requested review from JukkaL

@hauntsaninja hauntsaninja Awaiting requested review from hauntsaninja

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Incremental parsing crash with inline dynamic enum.Enum construction

2 participants

@ilevkivskyi @JelleZijlstra