This repository was archived by the owner on Oct 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1212from ._mlir_libs ._mlir import (
1313 register_type_caster ,
1414 register_value_caster ,
15- globals ,
15+ globals as _globals ,
1616)
1717from ._mlir_libs import (
1818 get_dialect_registry ,
@@ -32,17 +32,17 @@ def loc_tracebacks(*, max_depth: int | None = None) -> Iterable[None]:
3232 max_depth: Maximum number of frames to include in the location.
3333 If None, the default limit is used.
3434 """
35- old_enabled = globals .loc_tracebacks_enabled ()
36- old_limit = globals .loc_tracebacks_frame_limit ()
35+ old_enabled = _globals .loc_tracebacks_enabled ()
36+ old_limit = _globals .loc_tracebacks_frame_limit ()
3737 try :
38- globals .set_loc_tracebacks_frame_limit (max_depth )
38+ _globals .set_loc_tracebacks_frame_limit (max_depth )
3939 if not old_enabled :
40- globals .set_loc_tracebacks_enabled (True )
40+ _globals .set_loc_tracebacks_enabled (True )
4141 yield
4242 finally :
4343 if not old_enabled :
44- globals .set_loc_tracebacks_enabled (False )
45- globals .set_loc_tracebacks_frame_limit (old_limit )
44+ _globals .set_loc_tracebacks_enabled (False )
45+ _globals .set_loc_tracebacks_frame_limit (old_limit )
4646
4747
4848# Convenience decorator for registering user-friendly Attribute builders.
You can’t perform that action at this time.
0 commit comments