Skip to content

Commit ca38856

Browse files
authored
Fix set annotations in concurrent.futures._base (#6034)
1 parent b562d23 commit ca38856

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stdlib/concurrent/futures/_base.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import sys
22
import threading
33
from _typeshed import Self
44
from abc import abstractmethod
5-
from collections.abc import Container, Iterable, Iterator, Sequence, Set
5+
from collections.abc import Container, Iterable, Iterator, Sequence
66
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
88

99
if sys.version_info >= (3, 9):
1010
from types import GenericAlias
@@ -76,12 +76,12 @@ def as_completed(fs: Iterable[Future[_T]], timeout: float | None = ...) -> Itera
7676

7777
# Ideally this would be a namedtuple, but mypy doesn't support generic tuple types. See #1976
7878
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]: ...
8282
def __len__(self) -> int: ...
8383
@overload
84-
def __getitem__(self, i: int) -> Set[Future[_T]]: ...
84+
def __getitem__(self, i: int) -> set[Future[_T]]: ...
8585
@overload
8686
def __getitem__(self, s: slice) -> DoneAndNotDoneFutures[_T]: ...
8787

0 commit comments

Comments
 (0)