PY-76874 Conformance test failure: annotations_generators.py

- Refactored PyTypeCheckerInspection.visitPyYieldExpression() to handle delegating and regular yield expressions separately
- Added PyTypeCheckerInspection.visitDelegatingYieldExpression() to validate delegating yield expressions
- Refactored GeneratorTypeDescriptor.create() into .fromGenerator() and .fromGeneratorOrProtocol()
- Inline GeneratorTypeDescriptor.withAsync and GeneratorTypeDescriptor.toPyType

GitOrigin-RevId: e414dc35430290eae9d022f9d8a458966ac90836
This commit is contained in:
Aleksandr.Govenko
2025-08-01 16:38:38 +00:00
committed by intellij-monorepo-bot
parent bc7d99dfa1
commit 19d608d348
12 changed files with 240 additions and 125 deletions
@@ -1,4 +1,4 @@
async def gen() -> str:
async def gen() -> <warning descr="Expected type 'AsyncGenerator[str | float, Any]', got 'str' instead">str</warning>:
b: bool = <warning descr="Expected type 'str', got 'AsyncGenerator[str | float, Any]' instead"><caret>yield "str"</warning>
if b:
b = <warning descr="Expected type 'str', got 'AsyncGenerator[str | float, Any]' instead">yield 3.14</warning>