[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:
parent
b5fc8a15e0
commit
91b08f8c93
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user