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

View file

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

View file

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