Skip to content

Commit 945a308

Browse files
committed
add missing types
1 parent 2c82a82 commit 945a308

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: stubs/tqdm/tqdm/std.pyi

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Self
12
from typing import Any, Dict, Iterable, Iterator, TypeVar
23

34
from .utils import Comparable
@@ -102,11 +103,11 @@ class tqdm(Comparable):
102103
def __bool__(self) -> bool: ...
103104
def __nonzero__(self) -> bool: ...
104105
def __len__(self) -> int | None: ...
105-
def __enter__(self): ...
106+
def __enter__(self: Self) -> Self: ...
106107
def __exit__(self, *args: Any, **kwargs: Any) -> None: ...
107-
def __hash__(self): ...
108-
def __iter__(self): ...
109-
def update(self, n: float = ...): ...
108+
def __hash__(self) -> int: ...
109+
def __iter__(self) -> Iterator[Any]: ...
110+
def update(self, n: float = ...) -> None: ...
110111
def close(self) -> None: ...
111112
def clear(self, nolock: bool = ...) -> None: ...
112113
def refresh(self, nolock: bool = ..., lock_args: Any | None = ...) -> bool: ...
@@ -119,7 +120,7 @@ class tqdm(Comparable):
119120
def moveto(self, n: int) -> None: ...
120121
@property
121122
def format_dict(self) -> Dict[str, Any]: ...
122-
def display(self, msg: str | None = ..., pos: int | None = ...): ...
123+
def display(self, msg: str | None = ..., pos: int | None = ...) -> bool: ...
123124
@classmethod
124125
def wrapattr(cls, stream: Any, method: str, total: float | None = ..., bytes: bool = ..., **tqdm_kwargs: Any) -> object: ...
125126

0 commit comments

Comments
 (0)