from types import TracebackType
from typing import Generic, Type, TypeVar

_T = TypeVar("_T")

class ProgressBar(Generic[_T]):
    def update(self, n_steps: int) -> None: ...
    def finish(self) -> None: ...
    def __enter__(self) -> ProgressBar[_T]: ...
    def __exit__(
        self, exctype: Type[BaseException] | None, excinst: BaseException | None, exctb: TracebackType | None
    ) -> None: ...
    def __iter__(self) -> ProgressBar[_T]: ...
    def next(self) -> _T: ...
    def __next__(self) -> _T: ...
    length: int | None
    label: str
