Add tqdm partial to utilities

This commit is contained in:
Joakim Soderlund 2018-03-04 14:47:39 +01:00
parent f9b65dab70
commit f2e013241d
3 changed files with 15 additions and 0 deletions

View file

@ -25,9 +25,12 @@ Various utilities.
import json
import os
import shutil
from functools import partial
from typing import Any, Dict, Optional, Type, TypeVar, Union
from pkg_resources import resource_string
from tqdm import tqdm
from fimfarchive.flavors import Flavor
from fimfarchive.stories import Story
@ -36,12 +39,22 @@ __all__ = (
'Empty',
'PersistedDict',
'find_flavor',
'tqdm',
)
F = TypeVar('F', bound=Flavor)
tqdm = partial(
tqdm,
ascii=True,
leave=False,
smoothing=0,
ncols=72,
)
class EmptyMeta(type):
"""
Meta-class for Empty.

View file

@ -7,3 +7,4 @@ jmespath
mypy
pytest
requests
tqdm

View file

@ -91,5 +91,6 @@ setup(
'boltons',
'jmespath',
'requests',
'tqdm',
),
)