Skip to content

Support @no_type_check with native parser#20959

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:no-type-check-native
Mar 3, 2026
Merged

Support @no_type_check with native parser#20959
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:no-type-check-native

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

We apply @no_type_check in fastparse.py using some (fragile) name matching. A more proper way (which also works for native parser) is to erase annotations during semantic analysis. This fixes half a dozen tests with native parser.

cc @JukkaL

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit cbb60d8 into python:master Mar 3, 2026
24 checks passed
@ilevkivskyi ilevkivskyi deleted the no-type-check-native branch March 3, 2026 14:44
Sign up for free to 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.

1 participant