Skip to content

Commit 1d4f3d0

Browse files
committed
CLN: use ternary op
1 parent 2784f44 commit 1d4f3d0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

larray_editor/api.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ def edit(obj=None, title='', minvalue=None, maxvalue=None, readonly=False, depth
117117
qt_app, parent = get_app_and_window("Viewer")
118118

119119
caller_frame = sys._getframe(depth + 1)
120-
if display_caller_info:
121-
caller_info = getframeinfo(caller_frame)
122-
else:
123-
caller_info = None
124-
120+
caller_info = getframeinfo(caller_frame) if display_caller_info else None
125121
if obj is None:
126122
global_vars = caller_frame.f_globals
127123
local_vars = caller_frame.f_locals

0 commit comments

Comments
 (0)