From 91b08f8c93db3c9ec0097b8a4b898135a1a539cd Mon Sep 17 00:00:00 2001 From: Sergei Lebedev <185856+superbobry@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:39:48 +0000 Subject: [PATCH] [MLIR] [Python] Fixed the return type of `loc_traceback` (#185976) Older type checkers do not support single-type-argument `Generator`. --- mlir/python/mlir/ir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/python/mlir/ir.py b/mlir/python/mlir/ir.py index d86298a72c6f..710d9601f544 100644 --- a/mlir/python/mlir/ir.py +++ b/mlir/python/mlir/ir.py @@ -46,7 +46,7 @@ def get_parent_of_type(op: OpView | Operation, op_class: type[OpView]) -> OpView @contextmanager -def loc_tracebacks(*, max_depth: int | None = None) -> Generator[None]: +def loc_tracebacks(*, max_depth: int | None = None) -> Generator[None, None, None]: """Enables automatic traceback-based locations for MLIR operations. Operations created within this context will have their location