From b56759399dbfdf69e5fcd2845f6dfa42f2d64df4 Mon Sep 17 00:00:00 2001 From: Google Colaboratory Team Date: Fri, 20 Mar 2026 10:22:49 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 886858907 --- google/colab/_inspector.py | 1 - google/colab/_reprs.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/google/colab/_inspector.py b/google/colab/_inspector.py index 15e4358c..3a3126db 100644 --- a/google/colab/_inspector.py +++ b/google/colab/_inspector.py @@ -581,7 +581,6 @@ def info(self, obj, oname='', formatter=None, info=None, detail_level=0): filename = oinspect.find_file(obj) if filename and ( filename.endswith(('.py', '.py3', '.pyc')) - or 'ipython-input-' in filename or 'ipykernel_' in filename ): out['file'] = filename diff --git a/google/colab/_reprs.py b/google/colab/_reprs.py index 5d0c8bc7..ec148be7 100644 --- a/google/colab/_reprs.py +++ b/google/colab/_reprs.py @@ -286,8 +286,7 @@ def _function_repr(obj): ) result += html.escape(docs) + '' - jupyter_paths = ('ipython-input', 'ipykernel_') - if filename and all(path not in filename for path in jupyter_paths): + if filename and 'ipykernel_' not in filename: line = oinspect.find_source_lines(obj) result += f"""