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 12
12
from ._mlir_libs ._mlir import (
13
13
register_type_caster ,
14
14
register_value_caster ,
15
- globals ,
15
+ globals as _globals ,
16
16
)
17
17
from ._mlir_libs import (
18
18
get_dialect_registry ,
@@ -32,17 +32,17 @@ def loc_tracebacks(*, max_depth: int | None = None) -> Iterable[None]:
32
32
max_depth: Maximum number of frames to include in the location.
33
33
If None, the default limit is used.
34
34
"""
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 ()
37
37
try :
38
- globals .set_loc_tracebacks_frame_limit (max_depth )
38
+ _globals .set_loc_tracebacks_frame_limit (max_depth )
39
39
if not old_enabled :
40
- globals .set_loc_tracebacks_enabled (True )
40
+ _globals .set_loc_tracebacks_enabled (True )
41
41
yield
42
42
finally :
43
43
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 )
46
46
47
47
48
48
# Convenience decorator for registering user-friendly Attribute builders.
You can’t perform that action at this time.
0 commit comments