From 703c03e4b094b6bcc01a6d2d7c08860a9c8dd0ee Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Tue, 16 Oct 2018 10:36:17 +0200 Subject: [PATCH] Add UserString and UserList data attribute (#2518) --- stdlib/2/UserString.pyi | 1 + stdlib/3/collections/__init__.pyi | 2 ++ 2 files changed, 3 insertions(+) diff --git a/stdlib/2/UserString.pyi b/stdlib/2/UserString.pyi index c67b0feab..82cab2180 100644 --- a/stdlib/2/UserString.pyi +++ b/stdlib/2/UserString.pyi @@ -5,6 +5,7 @@ _UST = TypeVar("_UST", bound=UserString) _MST = TypeVar("_MST", bound=MutableString) class UserString(Sequence[UserString]): + data: unicode def __init__(self, seq: object) -> None: ... def __int__(self) -> int: ... def __long__(self) -> long: ... diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index 19f5e59ec..003fcf7c4 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -76,6 +76,7 @@ class UserDict(MutableMapping[_KT, _VT]): _UserListT = TypeVar('_UserListT', bound=UserList) class UserList(MutableSequence[_T]): + data: List[_T] def __init__(self, initlist: Optional[Iterable[_T]] = ...) -> None: ... def __lt__(self, other: object) -> bool: ... def __le__(self, other: object) -> bool: ... @@ -111,6 +112,7 @@ class UserList(MutableSequence[_T]): _UserStringT = TypeVar('_UserStringT', bound=UserString) class UserString(Sequence[str]): + data: str def __init__(self, seq: object) -> None: ... def __int__(self) -> int: ... def __float__(self) -> float: ...