Skip to content

Commit b567593

Browse files
No public description
PiperOrigin-RevId: 886858907
1 parent 88a4128 commit b567593

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

google/colab/_inspector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ def info(self, obj, oname='', formatter=None, info=None, detail_level=0):
581581
filename = oinspect.find_file(obj)
582582
if filename and (
583583
filename.endswith(('.py', '.py3', '.pyc'))
584-
or 'ipython-input-' in filename
585584
or 'ipykernel_' in filename
586585
):
587586
out['file'] = filename

google/colab/_reprs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ def _function_repr(obj):
286286
)
287287

288288
result += html.escape(docs) + '</pre>'
289-
jupyter_paths = ('ipython-input', 'ipykernel_')
290-
if filename and all(path not in filename for path in jupyter_paths):
289+
if filename and 'ipykernel_' not in filename:
291290
line = oinspect.find_source_lines(obj)
292291
result += f"""
293292
<script>

0 commit comments

Comments
 (0)