Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import traitlets as top-level module #4709

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 1 addition & 7 deletions google/colab/_reprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
import json
import types
import uuid
import warnings
from google.colab import _inspector
# pytype: disable=import-error
import IPython
from IPython.core import oinspect
import numpy as np
import PIL as pil
# pylint: disable=g-import-not-at-top
with warnings.catch_warnings():
# Importing via IPython raises a spurious warning, but avoids a version
# mismatch internally.
warnings.simplefilter('ignore')
from IPython.utils import traitlets
import traitlets


_original_string_formatters = {}
Expand Down
10 changes: 1 addition & 9 deletions google/colab/data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import html as _html
import json as _json
import traceback as _traceback
import warnings as _warnings

from google.colab import _interactive_table_helper
from google.colab import _quickchart_hint_button
Expand All @@ -33,14 +32,7 @@
import IPython as _IPython
from IPython import display as _display
import packaging.version as _version


# pylint: disable=g-import-not-at-top
with _warnings.catch_warnings():
# Importing via IPython raises a spurious warning, but avoids a version
# mismatch internally.
_warnings.simplefilter('ignore')
from IPython.utils import traitlets as _traitlets
import traitlets as _traitlets

# pylint: enable=g-import-not-at-top

Expand Down