Open josetapadas opened 1 week ago
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
Thank you for the review @sterliakov :pray: I have now pushed the suggested changes
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
Fixes #18124
This PR proposes the introduction of two extra checks in order to error or any
await
orasync
within list comprehensions but not when inside aGeneratorExpression
.To achieve this we propose:
ListComprehension
we should also check for the existing of anawait
expression and error outside a courotineDictionaryComprehension
AwaitExpression
we add an extra check to verify if it is inside aGeneratorExpression
to not fail