Skip to content

Commit 7cdba26

Browse files
authored
Merge pull request #311 from martinRenou/small_speedup
Small speedup improvement on the inspection logic in Python
2 parents 306964c + 56e2e41 commit 7cdba26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inspectorscripts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _jupyterlab_variableinspector_dict_list():
152152
def keep_cond(v):
153153
try:
154154
obj = eval(v)
155-
if isinstance(obj, str):
155+
if isinstance(obj, (bool, str, list, int, float, type(None))):
156156
return True
157157
if __tf and isinstance(obj, __tf.Variable):
158158
return True

0 commit comments

Comments
 (0)