mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 01:17:39 +08:00
Update collections and typing.NamedTuple (#1276)
* Update stubs for `collections` module in both Pythons. * Update `typing.NamedTuple` stub to have `_source` attribute. * Fix compatibility of `deque.index` signature with supertype `Sequence`
This commit is contained in:
committed by
Jelle Zijlstra
parent
6f0c929658
commit
f9872cafd8
@@ -495,6 +495,7 @@ def cast(tp: Type[_T], obj: Any) -> _T: ...
|
||||
# NamedTuple is special-cased in the type checker
|
||||
class NamedTuple(tuple):
|
||||
_fields = ... # type: Tuple[str, ...]
|
||||
_source = ... # type: str
|
||||
|
||||
def __init__(self, typename: str, fields: Iterable[Tuple[str, Any]] = ..., *,
|
||||
verbose: bool = ..., rename: bool = ..., **kwargs: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user