Skip to content

fix(checker): associate code=codes.MISC with zero-member enum stub error and note - #21783

Open
amir-rezaei wants to merge 1 commit into
python:masterfrom
amir-rezaei:fix/checker-zero-member-enum-error-code
Open

fix(checker): associate code=codes.MISC with zero-member enum stub error and note#21783
amir-rezaei wants to merge 1 commit into
python:masterfrom
amir-rezaei:fix/checker-zero-member-enum-error-code

Conversation

@amir-rezaei

Copy link
Copy Markdown

Description

This PR resolves issue #21730 by associating code=codes.MISC with the zero-member enum stub error and note in mypy/checker.py.

Details

  • Allows zero-member enum errors in stubs to be cleanly suppressed using # type: ignore[misc] or disable_error_code=misc when intended by API authors.

@github-actions

Copy link
Copy Markdown
Contributor

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

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.

2 participants