Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line number if __iter__ is incorrectly reported as missing #14893

Merged
merged 3 commits into from
Mar 13, 2023

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Mar 13, 2023

A type was used as error context, but types don't reliably have valid line numbers during type checking. Pass context explicitly instead.

The error in the test case is actually a false positive, but I'm first fixing the line number of the error, since it seems plausible that the wrong line number could cause other problems.

Work on #14892.

A type was used as error context, but types don't reliably have line numbers
during type checking. Pass context explicitly instead.
@github-actions
Copy link
Contributor

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

@JukkaL JukkaL merged commit 895a821 into master Mar 13, 2023
@JukkaL JukkaL deleted the fix-iter-context branch March 13, 2023 16:00
AlexWaygood added a commit to AlexWaygood/mypy that referenced this pull request Mar 13, 2023
JelleZijlstra pushed a commit that referenced this pull request Mar 13, 2023
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