python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
18.53k stars 2.83k forks source link

fix: refactor sem analysis of the await-not-async on generators and list comprehension #18152

Open josetapadas opened 1 week ago

josetapadas commented 1 week ago

Fixes #18124

This PR proposes the introduction of two extra checks in order to error or any await or async within list comprehensions but not when inside a GeneratorExpression.

To achieve this we propose:

github-actions[bot] commented 1 week ago

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

github-actions[bot] commented 1 week ago

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

josetapadas commented 1 week ago

Thank you for the review @sterliakov :pray: I have now pushed the suggested changes

github-actions[bot] commented 1 week ago

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

github-actions[bot] commented 3 days ago

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