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

No public description #4542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 9 additions & 6 deletions google/colab/_reprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
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

# TODO(b/210783561): Keep both imports as we migrate to IPython 7
try:
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
except ImportError:
import traitlets

_original_string_formatters = {}

Expand Down
19 changes: 11 additions & 8 deletions google/colab/data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,18 @@
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

# pylint: enable=g-import-not-at-top
# TODO(b/210783561): Keep both imports as we migrate to IPython 7
try:
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
except ImportError:
# pytype: disable=import-error
import traitlets as _traitlets
# pytype: enable=import-error

__all__ = [
'DataTable',
Expand Down
Loading