typing_progressbar.py
This file
Path
tests/typing/typing_progressbar.py
24 lines · 559 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 9ce34f2 point at it.
Make faqs section. Add the first question about windows shell expansion. (#2927)Rowlando13before adoption9ce34f2
lines 1–24why, one step back1from __future__ import annotations23from typing_extensions import assert_type45from click import progressbar6from click._termui_impl import ProgressBar789def test_length_is_int() -> None:10 with progressbar(length=5) as bar:11 assert_type(bar, ProgressBar[int])12 for i in bar:13 assert_type(i, int)141516def it() -> tuple[str, ...]:17 return ("hello", "world")181920def test_generic_on_iterable() -> None:21 with progressbar(it()) as bar:22 assert_type(bar, ProgressBar[str])23 for s in bar:24 assert_type(s, str)