diff --git a/mypy/stubgen.py b/mypy/stubgen.py
--- a/mypy/stubgen.py
+++ b/mypy/stubgen.py
@@ -126,7 +126,12 @@
     report_missing,
     walk_packages,
 )
-from mypy.traverser import all_yield_expressions, has_return_statement, has_yield_expression
+from mypy.traverser import (
+    all_yield_expressions,
+    has_return_statement,
+    has_yield_expression,
+    has_yield_from_expression,
+)
 from mypy.types import (
     OVERLOAD_NAMES,
     TPDICT_NAMES,
@@ -774,18 +779,22 @@ def visit_func_def(self, o: FuncDef) -> None:
             retname = None  # implicit Any
         elif o.name in KNOWN_MAGIC_METHODS_RETURN_TYPES:
             retname = KNOWN_MAGIC_METHODS_RETURN_TYPES[o.name]
-        elif has_yield_expression(o):
+        elif has_yield_expression(o) or has_yield_from_expression(o):
             self.add_typing_import("Generator")
             yield_name = "None"
             send_name = "None"
             return_name = "None"
-            for expr, in_assignment in all_yield_expressions(o):
-                if expr.expr is not None and not self.is_none_expr(expr.expr):
-                    self.add_typing_import("Incomplete")
-                    yield_name = self.typing_name("Incomplete")
-                if in_assignment:
-                    self.add_typing_import("Incomplete")
-                    send_name = self.typing_name("Incomplete")
+            if has_yield_from_expression(o):
+                self.add_typing_import("Incomplete")
+                yield_name = send_name = self.typing_name("Incomplete")
+            else:
+                for expr, in_assignment in all_yield_expressions(o):
+                    if expr.expr is not None and not self.is_none_expr(expr.expr):
+                        self.add_typing_import("Incomplete")
+                        yield_name = self.typing_name("Incomplete")
+                    if in_assignment:
+                        self.add_typing_import("Incomplete")
+                        send_name = self.typing_name("Incomplete")
             if has_return_statement(o):
                 self.add_typing_import("Incomplete")
                 return_name = self.typing_name("Incomplete")
diff --git a/mypy/traverser.py b/mypy/traverser.py
--- a/mypy/traverser.py
+++ b/mypy/traverser.py
@@ -873,6 +873,21 @@ def has_yield_expression(fdef: FuncBase) -> bool:
     return seeker.found
 
 
+class YieldFromSeeker(FuncCollectorBase):
+    def __init__(self) -> None:
+        super().__init__()
+        self.found = False
+
+    def visit_yield_from_expr(self, o: YieldFromExpr) -> None:
+        self.found = True
+
+
+def has_yield_from_expression(fdef: FuncBase) -> bool:
+    seeker = YieldFromSeeker()
+    fdef.accept(seeker)
+    return seeker.found
+
+
 class AwaitSeeker(TraverserVisitor):
     def __init__(self) -> None:
         super().__init__()
@@ -922,3 +937,24 @@ def all_yield_expressions(node: Node) -> list[tuple[YieldExpr, bool]]:
     v = YieldCollector()
     node.accept(v)
     return v.yield_expressions
+
+
+class YieldFromCollector(FuncCollectorBase):
+    def __init__(self) -> None:
+        super().__init__()
+        self.in_assignment = False
+        self.yield_from_expressions: list[tuple[YieldFromExpr, bool]] = []
+
+    def visit_assignment_stmt(self, stmt: AssignmentStmt) -> None:
+        self.in_assignment = True
+        super().visit_assignment_stmt(stmt)
+        self.in_assignment = False
+
+    def visit_yield_from_expr(self, expr: YieldFromExpr) -> None:
+        self.yield_from_expressions.append((expr, self.in_assignment))
+
+
+def all_yield_from_expressions(node: Node) -> list[tuple[YieldFromExpr, bool]]:
+    v = YieldFromCollector()
+    node.accept(v)
+    return v.yield_from_expressions

diff --git a/test-data/unit/stubgen.test b/test-data/unit/stubgen.test
--- a/test-data/unit/stubgen.test
+++ b/test-data/unit/stubgen.test
@@ -1231,6 +1231,9 @@ def h1():
 def h2():
     yield
     return "abc"
+def h3():
+    yield
+    return None
 def all():
     x = yield 123
     return "abc"
@@ -1242,6 +1245,7 @@ def f() -> Generator[Incomplete, None, None]: ...
 def g() -> Generator[None, Incomplete, None]: ...
 def h1() -> Generator[None, None, None]: ...
 def h2() -> Generator[None, None, Incomplete]: ...
+def h3() -> Generator[None, None, None]: ...
 def all() -> Generator[Incomplete, Incomplete, Incomplete]: ...
 
 [case testFunctionYieldsNone]
@@ -1270,6 +1274,69 @@ class Generator: ...
 
 def f() -> _Generator[Incomplete, None, None]: ...
 
+[case testGeneratorYieldFrom]
+def g1():
+    yield from x
+def g2():
+    y = yield from x
+def g3():
+    yield from x
+    return
+def g4():
+    yield from x
+    return None
+def g5():
+    yield from x
+    return z
+
+[out]
+from _typeshed import Incomplete
+from collections.abc import Generator
+
+def g1() -> Generator[Incomplete, Incomplete, None]: ...
+def g2() -> Generator[Incomplete, Incomplete, None]: ...
+def g3() -> Generator[Incomplete, Incomplete, None]: ...
+def g4() -> Generator[Incomplete, Incomplete, None]: ...
+def g5() -> Generator[Incomplete, Incomplete, Incomplete]: ...
+
+[case testGeneratorYieldAndYieldFrom]
+def g1():
+    yield x1
+    yield from x2
+def g2():
+    yield x1
+    y = yield from x2
+def g3():
+    y = yield x1
+    yield from x2
+def g4():
+    yield x1
+    yield from x2
+    return
+def g5():
+    yield x1
+    yield from x2
+    return None
+def g6():
+    yield x1
+    yield from x2
+    return z
+def g7():
+    yield None
+    yield from x2
+
+[out]
+from _typeshed import Incomplete
+from collections.abc import Generator
+
+def g1() -> Generator[Incomplete, Incomplete, None]: ...
+def g2() -> Generator[Incomplete, Incomplete, None]: ...
+def g3() -> Generator[Incomplete, Incomplete, None]: ...
+def g4() -> Generator[Incomplete, Incomplete, None]: ...
+def g5() -> Generator[Incomplete, Incomplete, None]: ...
+def g6() -> Generator[Incomplete, Incomplete, Incomplete]: ...
+def g7() -> Generator[Incomplete, Incomplete, None]: ...
+
 [case testCallable]
 from typing import Callable
 
@@ -2977,13 +3044,17 @@ def func(*, non_default_kwarg: bool, default_kwarg: bool = True): ...
 def func(*, non_default_kwarg: bool, default_kwarg: bool = ...): ...
 
 [case testNestedGenerator]
-def f():
+def f1():
     def g():
         yield 0
-
+    return 0
+def f2():
+    def g():
+        yield from [0]
     return 0
 [out]
-def f(): ...
+def f1(): ...
+def f2(): ...
 
 [case testKnownMagicMethodsReturnTypes]
 class Some:
@@ -3193,6 +3264,10 @@ def gen():
     y = yield x
     return z
 
+def gen2():
+    y = yield from x
+    return z
+
 class X(unknown_call("X", "a b")): ...
 class Y(collections.namedtuple("Y", xx)): ...
 [out]
@@ -3227,6 +3302,7 @@ TD2: _Incomplete
 TD3: _Incomplete
 
 def gen() -> _Generator[_Incomplete, _Incomplete, _Incomplete]: ...
+def gen2() -> _Generator[_Incomplete, _Incomplete, _Incomplete]: ...
 
 class X(_Incomplete): ...
 class Y(_Incomplete): ...

stubgen: Support "yield from"
**Feature**

stubgen should support functions that use `yield from` in the function body.


mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testGeneratorYieldAndYieldFrom mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testGeneratorYieldFrom
mypy/test/testsemanal.py::SemAnalSuite::semanal-typealiases.test::testCallableTypeAlias mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTuple mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableUnionOfNoneAndCallable mypyc/test/test_irbuild.py::TestGenOps::irbuild-basic.test::testCallableTypesWithKeywordArgs mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolGenericNotGeneric mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testCallable mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgsInGenericFunction mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgsSubtypingWithGenericFunc mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableProtocolVsProtocol mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableDef mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableCallableClasses mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithKwargs mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolGeneric mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTypeType mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableTypeAnalysis mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolOverload mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableParsingInInheritence mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgs mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableNestedUnions mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableDuplicateNames mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableOr mypy/test/testcheck.py::TypeCheckSuite::check-parameter-specification.test::testCallablesAsParameters mypy/test/testcheck.py::TypeCheckSuite::check-inference.test::testCallableListJoinInference mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolArgName mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testCallableObject mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableNoArgs mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithKeywordOnlyArg mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableObjectAny mypy/test/testcheck.py::TypeCheckSuite::check-type-aliases.test::testCallableTypeAlias mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableKindsOrdering mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableDataAttribute mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithOptionalArgFromExpr mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableParsingFromExpr mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableArgument mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithNamedArg mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocol mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolGenericTight mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableParsing mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCallableSpecificOverload mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testFunctionYieldsNone mypyc/test/test_run.py::TestRun::run-functions.test::testCallableTypes mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testKnownMagicMethodsReturnTypes mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableFastParseBadArgArgName mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgsSubtyping mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableVariables mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithVarArg mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableObject2 mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTypeVarEmpty mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableWithDifferentArgTypes mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableThenIsinstance mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTypeUnion mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTypeVarBound mypy/test/testdeps.py::GetDependenciesSuite::deps-types.test::testCallableType mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableOrOtherType mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableObjectGeneric mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgs2 mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableTooManyVarArg mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableLambda mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableArgKindSubtyping mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWrongTypeType mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithArbitraryArgsInErrorMessage mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testNestedGenerator mypy/test/testcheck.py::TypeCheckSuite::check-inference.test::testCallableMeetAndJoin mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableNotCallable mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableTypeVarUnion mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableParsingSameName mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithKeywordOnlyOptionalArg mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableAnd mypyc/test/test_irbuild.py::TestGenOps::irbuild-basic.test::testCallableTypes mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithOptionalArg mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableWithNamedArgFromExpr mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableObject mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallablePromote mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableWithNoneArgs mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableFastParseGood mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testCallableImplementsProtocolExtraNote mypy/test/testcheck.py::TypeCheckSuite::check-callable.test::testCallableUnionOfTypes mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testCallableAliasPreserved