mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Dict, Generic, Iterable, Sequence, Tuple, Type, TypeVar, overload
|
||||
from typing import Any, Callable, Generic, Iterable, Sequence, TypeVar, overload
|
||||
|
||||
_AnyCallable = Callable[..., Any]
|
||||
|
||||
@@ -19,12 +19,12 @@ def update_wrapper(
|
||||
def wraps(
|
||||
wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...
|
||||
) -> Callable[[_AnyCallable], _AnyCallable]: ...
|
||||
def total_ordering(cls: Type[_T]) -> Type[_T]: ...
|
||||
def total_ordering(cls: type[_T]) -> type[_T]: ...
|
||||
def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], Any]: ...
|
||||
|
||||
class partial(Generic[_T]):
|
||||
func = ... # Callable[..., _T]
|
||||
args: Tuple[Any, ...]
|
||||
keywords: Dict[str, Any]
|
||||
args: tuple[Any, ...]
|
||||
keywords: dict[str, Any]
|
||||
def __init__(self, func: Callable[..., _T], *args: Any, **kwargs: Any) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user