Add UserString and UserList data attribute (#2518)

This commit is contained in:
Lourens Veen
2018-10-16 10:36:17 +02:00
committed by Sebastian Rittau
parent 254af0ff2a
commit 703c03e4b0
2 changed files with 3 additions and 0 deletions

View File

@@ -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: ...

View File

@@ -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: ...