@@ -2,9 +2,9 @@ import sys
2
2
import threading
3
3
from _typeshed import Self
4
4
from abc import abstractmethod
5
- from collections .abc import Container , Iterable , Iterator , Sequence , Set
5
+ from collections .abc import Container , Iterable , Iterator , Sequence
6
6
from logging import Logger
7
- from typing import Any , Callable , Generic , Protocol , TypeVar , overload
7
+ from typing import Any , Callable , Generic , Protocol , Set , TypeVar , overload
8
8
9
9
if sys .version_info >= (3 , 9 ):
10
10
from types import GenericAlias
@@ -76,12 +76,12 @@ def as_completed(fs: Iterable[Future[_T]], timeout: float | None = ...) -> Itera
76
76
77
77
# Ideally this would be a namedtuple, but mypy doesn't support generic tuple types. See #1976
78
78
class DoneAndNotDoneFutures (Sequence [Set [Future [_T ]]]):
79
- done : Set [Future [_T ]]
80
- not_done : Set [Future [_T ]]
81
- def __new__ (_cls , done : Set [Future [_T ]], not_done : Set [Future [_T ]]) -> DoneAndNotDoneFutures [_T ]: ...
79
+ done : set [Future [_T ]]
80
+ not_done : set [Future [_T ]]
81
+ def __new__ (_cls , done : set [Future [_T ]], not_done : set [Future [_T ]]) -> DoneAndNotDoneFutures [_T ]: ...
82
82
def __len__ (self ) -> int : ...
83
83
@overload
84
- def __getitem__ (self , i : int ) -> Set [Future [_T ]]: ...
84
+ def __getitem__ (self , i : int ) -> set [Future [_T ]]: ...
85
85
@overload
86
86
def __getitem__ (self , s : slice ) -> DoneAndNotDoneFutures [_T ]: ...
87
87
0 commit comments