mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -2,7 +2,7 @@ import array
|
||||
import threading
|
||||
import weakref
|
||||
from Queue import Queue
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
class DummyProcess(threading.Thread):
|
||||
_children: weakref.WeakKeyDictionary[Any, Any]
|
||||
@@ -35,7 +35,7 @@ JoinableQueue = Queue
|
||||
def Array(typecode, sequence, lock=...) -> array.array[Any]: ...
|
||||
def Manager() -> Any: ...
|
||||
def Pool(processes=..., initializer=..., initargs=...) -> Any: ...
|
||||
def active_children() -> List[Any]: ...
|
||||
def active_children() -> list[Any]: ...
|
||||
def current_process() -> threading.Thread: ...
|
||||
def freeze_support() -> None: ...
|
||||
def shutdown() -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from Queue import Queue
|
||||
from typing import Any, List, Tuple
|
||||
from typing import Any
|
||||
|
||||
families: List[None]
|
||||
families: list[None]
|
||||
|
||||
class Connection(object):
|
||||
_in: Any
|
||||
@@ -22,4 +22,4 @@ class Listener(object):
|
||||
def close(self) -> None: ...
|
||||
|
||||
def Client(address) -> Connection: ...
|
||||
def Pipe(duplex=...) -> Tuple[Connection, Connection]: ...
|
||||
def Pipe(duplex=...) -> tuple[Connection, Connection]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List
|
||||
from typing import Any, Callable, Iterable, Iterator
|
||||
|
||||
class AsyncResult:
|
||||
def get(self, timeout: float | None = ...) -> Any: ...
|
||||
@@ -20,15 +20,15 @@ class Pool(object):
|
||||
initargs: Iterable[Any] = ...,
|
||||
maxtasksperchild: int | None = ...,
|
||||
) -> None: ...
|
||||
def apply(self, func: Callable[..., Any], args: Iterable[Any] = ..., kwds: Dict[str, Any] = ...) -> Any: ...
|
||||
def apply(self, func: Callable[..., Any], args: Iterable[Any] = ..., kwds: dict[str, Any] = ...) -> Any: ...
|
||||
def apply_async(
|
||||
self,
|
||||
func: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Dict[str, Any] = ...,
|
||||
kwds: dict[str, Any] = ...,
|
||||
callback: Callable[..., None] | None = ...,
|
||||
) -> AsyncResult: ...
|
||||
def map(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: int | None = ...) -> List[Any]: ...
|
||||
def map(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: int | None = ...) -> list[Any]: ...
|
||||
def map_async(
|
||||
self,
|
||||
func: Callable[..., Any],
|
||||
|
||||
Reference in New Issue
Block a user