We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc65cd0 commit 6d7d02cCopy full SHA for 6d7d02c
src/pypi_simple/progress.py
@@ -2,15 +2,15 @@
2
from collections.abc import Callable
3
import sys
4
from types import TracebackType
5
-from typing import Any, Optional, TypeVar
+from typing import TYPE_CHECKING, Any, Optional
6
7
if sys.version_info[:2] >= (3, 8):
8
from typing import Protocol, runtime_checkable
9
else:
10
from typing_extensions import Protocol, runtime_checkable
11
12
-
13
-T = TypeVar("T", bound="ProgressTracker")
+if TYPE_CHECKING:
+ from typing_extensions import Self
14
15
16
@runtime_checkable
@@ -23,7 +23,7 @@ class ProgressTracker(Protocol):
23
that will be called with the size of each downloaded file chunk.
24
"""
25
26
- def __enter__(self: T) -> T:
+ def __enter__(self) -> Self:
27
...
28
29
def __exit__(
0 commit comments