Skip to content

Conversation

ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi commented Jun 8, 2022

I only cover few most common situations. If this will show to be useful, we can expand the scope of this note.

@ilevkivskyi ilevkivskyi requested review from jhance and JukkaL June 8, 2022 15:05
@github-actions

This comment has been minimized.

@JukkaL
Copy link
Collaborator

JukkaL commented Jun 8, 2022

This looks like a very useful feature!

It's not clear to me if these are as expected or not (from mypy_primer) -- can you double check:

+ steam/iterators.py:592: note: Maybe you forgot to use "await"?
+ steam/state.py:1137: note: Maybe you forgot to use "await"?
+ steam/state.py:1141: note: Maybe you forgot to use "await"?

Maybe add a test case where we have type[X] which defines __await__, instead of an instance type? Should a type object be treated differently?

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

@ilevkivskyi ilevkivskyi merged commit 145d8a4 into python:master Jun 16, 2022
@ilevkivskyi ilevkivskyi deleted the add-await-note branch June 16, 2022 09:51
JukkaL added a commit that referenced this pull request Dec 26, 2022
This helps with await-related errors introduced in #12958, in
particular, which are expensive to generate. If errors are ignored (e.g.
in third-party libraries) or we don't care about the error message, use
simpler error message logic. We also often filter out error messages
temporarily, so any effort in constructing a nice error message is
wasted.

We could skip even more logic, but this should cover many of the
important code paths.

This speeds up self check by about 2%.
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