8000 No public description by copybara-service[bot] · Pull Request #5895 · googlecolab/colabtools · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion google/colab/_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ def info(self, obj, 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
Expand Down
3 changes: 1 addition & 2 deletions google/colab/_reprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ def _function_repr(obj):
)

result += html.escape(docs) + '</pre>'
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"""
<script>
Expand Down
Loading
0