mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 08:17:07 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -637,15 +637,15 @@ else:
|
||||
if sys.version_info >= (3, 9):
|
||||
def get_type_hints(
|
||||
obj: _get_type_hints_obj_allowed_types,
|
||||
globalns: Dict[str, Any] | None = ...,
|
||||
localns: Dict[str, Any] | None = ...,
|
||||
globalns: dict[str, Any] | None = ...,
|
||||
localns: dict[str, Any] | None = ...,
|
||||
include_extras: bool = ...,
|
||||
) -> Dict[str, Any]: ...
|
||||
) -> dict[str, Any]: ...
|
||||
|
||||
else:
|
||||
def get_type_hints(
|
||||
obj: _get_type_hints_obj_allowed_types, globalns: Dict[str, Any] | None = ..., localns: Dict[str, Any] | None = ...
|
||||
) -> Dict[str, Any]: ...
|
||||
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = ..., localns: dict[str, Any] | None = ...
|
||||
) -> dict[str, Any]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
@@ -663,14 +663,14 @@ def cast(typ: object, val: Any) -> Any: ...
|
||||
# NamedTuple is special-cased in the type checker
|
||||
class NamedTuple(Tuple[Any, ...]):
|
||||
_field_types: collections.OrderedDict[str, Type[Any]]
|
||||
_field_defaults: Dict[str, Any] = ...
|
||||
_field_defaults: dict[str, Any] = ...
|
||||
_fields: Tuple[str, ...]
|
||||
_source: str
|
||||
def __init__(self, typename: str, fields: Iterable[Tuple[str, Any]] = ..., **kwargs: Any) -> None: ...
|
||||
@classmethod
|
||||
def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def _asdict(self) -> Dict[str, Any]: ...
|
||||
def _asdict(self) -> dict[str, Any]: ...
|
||||
else:
|
||||
def _asdict(self) -> collections.OrderedDict[str, Any]: ...
|
||||
def _replace(self: _T, **kwargs: Any) -> _T: ...
|
||||
@@ -707,7 +707,7 @@ if sys.version_info >= (3, 7):
|
||||
def __init__(self, arg: str, is_argument: bool = ..., module: Any | None = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, arg: str, is_argument: bool = ...) -> None: ...
|
||||
def _evaluate(self, globalns: Dict[str, Any] | None, localns: Dict[str, Any] | None) -> Any | None: ...
|
||||
def _evaluate(self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None) -> Any | None: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __repr__(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user