Bump mypy from 1.13.0 to 1.16.1 (#18653)

This commit is contained in:
dependabot[bot]
2025-07-15 14:42:54 +01:00
committed by GitHub
parent 97d2738eef
commit 78ce4dc26f
19 changed files with 109 additions and 66 deletions
+7
View File
@@ -20,6 +20,7 @@
import functools
import sys
from types import GeneratorType
from typing import Any, Callable, Generator, List, TypeVar, cast
from typing_extensions import ParamSpec
@@ -151,6 +152,12 @@ def _check_yield_points(
) -> Generator["Deferred[object]", object, T]:
gen = f(*args, **kwargs)
# We only patch if we have a native generator function, as we rely on
# `gen.gi_frame`.
if not isinstance(gen, GeneratorType):
ret = yield from gen
return ret
last_yield_line_no = gen.gi_frame.f_lineno
result: Any = None
while True: