mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Cleanup: use lower-case list and dict, add a test (#6161)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from typing import Any, Callable, ContextManager, Dict, Generic, Iterable, Iterator, List, Mapping, TypeVar
|
||||
from typing import Any, Callable, ContextManager, Generic, Iterable, Iterator, List, Mapping, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -17,7 +17,7 @@ class ApplyResult(Generic[_T]):
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
cache: Dict[int, ApplyResult[Any]],
|
||||
cache: dict[int, ApplyResult[Any]],
|
||||
callback: Callable[[_T], None] | None,
|
||||
error_callback: Callable[[BaseException], None] | None,
|
||||
) -> None: ...
|
||||
@@ -44,7 +44,7 @@ class MapResult(ApplyResult[List[_T]]):
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
cache: Dict[int, ApplyResult[Any]],
|
||||
cache: dict[int, ApplyResult[Any]],
|
||||
chunksize: int,
|
||||
length: int,
|
||||
callback: Callable[[List[_T]], None] | None,
|
||||
@@ -55,7 +55,7 @@ class IMapIterator(Iterator[_T]):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(self, pool: Pool) -> None: ...
|
||||
else:
|
||||
def __init__(self, cache: Dict[int, IMapIterator[Any]]) -> None: ...
|
||||
def __init__(self, cache: dict[int, IMapIterator[Any]]) -> None: ...
|
||||
def __iter__(self: _S) -> _S: ...
|
||||
def next(self, timeout: float | None = ...) -> _T: ...
|
||||
def __next__(self, timeout: float | None = ...) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user