File: include_no_requirements.py

package info (click to toggle)
tqdm 4.67.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 720 kB
  • sloc: python: 5,610; makefile: 160; sh: 16
file content (11 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
# How to import tqdm in any frontend without enforcing it as a dependency
try:
    from tqdm.auto import tqdm
except ImportError:

    def tqdm(*args, **kwargs):
        if args:
            return args[0]
        return kwargs.get('iterable', None)

__all__ = ['tqdm']