mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -8,7 +8,7 @@ from collections.abc import Callable, ItemsView, Iterable, Iterator as _Iterator
|
||||
from functools import wraps as wraps
|
||||
from importlib.util import spec_from_loader as spec_from_loader
|
||||
from io import BytesIO as BytesIO, StringIO as StringIO
|
||||
from typing import Any, AnyStr, NoReturn, Pattern, Tuple, Type, TypeVar, overload
|
||||
from typing import Any, AnyStr, NoReturn, Pattern, Type, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from . import moves as moves
|
||||
@@ -44,9 +44,9 @@ Iterator = object
|
||||
|
||||
def get_method_function(meth: types.MethodType) -> types.FunctionType: ...
|
||||
def get_method_self(meth: types.MethodType) -> object | None: ...
|
||||
def get_function_closure(fun: types.FunctionType) -> Tuple[types._Cell, ...] | None: ...
|
||||
def get_function_closure(fun: types.FunctionType) -> tuple[types._Cell, ...] | None: ...
|
||||
def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
|
||||
def get_function_defaults(fun: types.FunctionType) -> Tuple[Any, ...] | None: ...
|
||||
def get_function_defaults(fun: types.FunctionType) -> tuple[Any, ...] | None: ...
|
||||
def get_function_globals(fun: types.FunctionType) -> dict[str, Any]: ...
|
||||
def iterkeys(d: Mapping[_K, Any]) -> _Iterator[_K]: ...
|
||||
def itervalues(d: Mapping[Any, _V]) -> _Iterator[_V]: ...
|
||||
|
||||
Reference in New Issue
Block a user