Skip to content

[undefined vars] fix per-module error code override bug - #14351

Merged
JukkaL merged 1 commit into
python:masterfrom
ilinum:undefined/per-module-error-code
Dec 28, 2022
Merged

JukkaL merged 1 commit into
python:masterfrom
ilinum:undefined/per-module-error-code

Conversation

@ilinum

@ilinum ilinum commented Dec 27, 2022

Copy link
Copy Markdown
Collaborator

This one would occur because we set the errors module with global options, instead of per-module override ones.
It only mattered for checks that happened after the partially undefined checks, which (I believe) is only the unused type: ignore checks.

This was discovered when updating tests for #14166.

I've also cleaned up the function signature a little.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JukkaL
JukkaL merged commit 109c8ce into python:master Dec 28, 2022
@ilinum
ilinum deleted the undefined/per-module-error-code branch January 23, 2023 15:34
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