Casper da Costa-Luis
Casper da Costa-Luis
from https://github.com/microsoft/pylance-release/issues/233#issuecomment-680216524 slight tweak: ```python from typing import Any, Iterable, Iterator, TypeVar _T = TypeVar("_T") def tqdm(iterable: Iterable[_T], *args: Any, **kwargs: Any) -> Iterator[_T]: ... ``` Is this really a...
atm it's actually `class tqdm.tqdm(tqdm.utils.Comparable(object))` (where `class tqdm.utils.Comparable(object)` has no `__init__`) so I'm not sure if that stub would need even further tweaking. Also presumably missing `self`?
What would the use case of this be? ```python from tqdm import trange def myComplexFunction(): pass for i in trange(999): myComplexFunction() ``` seems fine compared to ```python import tqdm @tqdm.decorator(999)...
Since `foo()` is user code, ```python foo_bar = tqdm(total=10) def foo(): sleep(1) foo_bar.update() # has progress bar func_iterator(foo, 10) ``` still seems like a more understandable alternative. or better (if...
The second, longer version (`foo` not user code) would be required either way. If `foo` is user code (first version) then it's only one more line than a decorator and...
Easiest would be to have multiple bars and set their descriptions independently
sigh ```python with tqdm(bar_format='{desc}{postfix}') as line1: with tqdm(...) as t: for i, ... in enumerate(t): line1.set_description(...) line1.set_postfix(...) t.set_description(...) t.set_postfix(...) ```
don't put '\n' into `set_description`
try setting `smoothing` to something lower than the default `0.3`. Maybe even zero? ```python process_map(..., smoothing=0) ``` BTW I think the `max_workers` logic from CPython is already duplicated.
> One solution could be to default to `miniters=max_workers`, if neither `miniters`, `mininterval` or `maxinterval` are given in the call to process_map, and if the number of total iterations is...