mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Full signature for namedtuple (#541)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
# These are not exported.
|
||||
from typing import (
|
||||
TypeVar, Iterable, Generic, Iterator, Dict, overload,
|
||||
Mapping, List, Tuple, Callable, Sized,
|
||||
Mapping, List, Tuple, Callable, Sized, Any, Type,
|
||||
Optional, Union
|
||||
)
|
||||
# These are exported.
|
||||
@@ -25,7 +25,8 @@ _VT = TypeVar('_VT')
|
||||
|
||||
|
||||
# namedtuple is special-cased in the type checker; the initializer is ignored.
|
||||
namedtuple = object()
|
||||
def namedtuple(typename: str, field_names: Union[str, Iterable[Any]], *,
|
||||
verbose: bool = ..., rename: bool = ..., module: str = None) -> Type[tuple]: ...
|
||||
|
||||
class UserDict(MutableMapping): ...
|
||||
class UserList(MutableSequence): ...
|
||||
|
||||
Reference in New Issue
Block a user