-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize tqdm modules architecture to avoid unnecessary imports
Signed-off-by: Stephen L. <lrq3000@gmail.com>
- Loading branch information
Showing
8 changed files
with
23 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,9 @@ | ||
from ._tqdm import tqdm | ||
from ._tqdm import trange | ||
from ._tqdm_gui import tqdm_gui | ||
from ._tqdm_gui import tgrange | ||
from ._tqdm_pandas import tqdm_pandas | ||
from .core import tqdm | ||
from .core import trange | ||
from ._main import main | ||
from ._main import TqdmKeyError | ||
from ._main import TqdmTypeError | ||
from ._version import __version__ # NOQA | ||
|
||
__all__ = ['tqdm', 'tqdm_gui', 'trange', 'tgrange', 'tqdm_pandas', | ||
'tqdm_notebook', 'tnrange', 'main', 'TqdmKeyError', 'TqdmTypeError', | ||
__all__ = ['tqdm', 'trange', 'main', 'TqdmKeyError', 'TqdmTypeError', | ||
'__version__'] | ||
|
||
|
||
def tqdm_notebook(*args, **kwargs): # pragma: no cover | ||
"""See tqdm._tqdm_notebook.tqdm_notebook for full documentation""" | ||
from ._tqdm_notebook import tqdm_notebook as _tqdm_notebook | ||
return _tqdm_notebook(*args, **kwargs) | ||
|
||
|
||
def tnrange(*args, **kwargs): # pragma: no cover | ||
""" | ||
A shortcut for tqdm_notebook(xrange(*args), **kwargs). | ||
On Python3+ range is used instead of xrange. | ||
""" | ||
from ._tqdm_notebook import tnrange as _tnrange | ||
return _tnrange(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from ._tqdm import tqdm | ||
from .core import tqdm | ||
from ._version import __version__ # NOQA | ||
import sys | ||
import re | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters