[MLIR] [Python] Fixed the return type of loc_traceback (#185976)

Older type checkers do not support single-type-argument `Generator`.
This commit is contained in:
Sergei Lebedev 2026-03-11 21:39:48 +00:00 committed by GitHub
parent b5fc8a15e0
commit 91b08f8c93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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