Skip to content

Commit

Permalink
notebook: minor ipywidgets tidy
Browse files Browse the repository at this point in the history
- related: #1135
  • Loading branch information
casperdcl committed Mar 3, 2021
1 parent b65a286 commit 9367463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Expand Up @@ -82,6 +82,7 @@ packages=find:
[options.extras_require]
dev=py-make>=0.1.0; twine; wheel
telegram=requests
notebook=ipywidgets>=6
[options.entry_points]
console_scripts=
tqdm=tqdm.cli:main
Expand Down
7 changes: 1 addition & 6 deletions tqdm/notebook.py
Expand Up @@ -22,22 +22,17 @@
if True: # pragma: no cover
# import IPython/Jupyter base widget and display utilities
IPY = 0
IPYW = 0
try: # IPython 4.x
import ipywidgets
IPY = 4
try:
IPYW = int(ipywidgets.__version__.split('.')[0])
except AttributeError: # __version__ may not exist in old versions
pass
except ImportError: # IPython 3.x / 2.x
IPY = 32
import warnings
with warnings.catch_warnings():
warnings.filterwarnings(
'ignore', message=".*The `IPython.html` package has been deprecated.*")
try:
import IPython.html.widgets as ipywidgets
import IPython.html.widgets as ipywidgets # NOQA: F401
except ImportError:
pass

Expand Down

0 comments on commit 9367463

Please sign in to comment.