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"""