mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Add tqdm partial to utilities
This commit is contained in:
parent
f9b65dab70
commit
f2e013241d
3 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||||
|
|
|
@ -7,3 +7,4 @@ jmespath
|
||||||
mypy
|
mypy
|
||||||
pytest
|
pytest
|
||||||
requests
|
requests
|
||||||
|
tqdm
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -91,5 +91,6 @@ setup(
|
||||||
'boltons',
|
'boltons',
|
||||||
'jmespath',
|
'jmespath',
|
||||||
'requests',
|
'requests',
|
||||||
|
'tqdm',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue