Format: application/octet-stream
1 import collections
2 from typing import Any, Iterable, List, MutableSequence, Optional, Sequence, Text, Tuple, TypeVar, Union, overload
3
4 _UST = TypeVar("_UST", bound=UserString)
5 _MST = TypeVar("_MST", bound=MutableString)
6
7 class UserString(Sequence[UserString]):
8 data: unicode
9 def __init__(self, seq: object) -> None: ...
10 def __int__(self) -> int: ...
11 def __long__(self) -> long: ...
12 def __float__(self) -> float: ...
13 def __complex__(self) -> complex: ...
14 def __hash__(self) -> int: ...
15 def __len__(self) -> int: ...
16 @overload
17 def __getitem__(self: _UST, i: int) -> _UST: ...
18 @overload
19 def __getitem__(self: _UST, s: slice) -> _UST: ...
20 def __add__(self: _UST, other: Any) -> _UST: ...
21 def __radd__(self: _UST, other: Any) -> _UST: ...
22 def __mul__(self: _UST, other: int) -> _UST: ...
23 def __rmul__(self: _UST, other: int) -> _UST: ...
24 def __mod__(self: _UST, args: Any) -> _UST: ...
25 def capitalize(self: _UST) -> _UST: ...
26 def center(self: _UST, width: int, *args: Any) -> _UST: ...
27 def count(self, sub: int, start: int = ..., end: int = ...) -> int: ...
28 def decode(self: _UST, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> _UST: ...
29 def encode(self: _UST, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> _UST: ...
30 def endswith(self, suffix: Text, start: int = ..., end: int = ...) -> bool: ...
31 def expandtabs(self: _UST, tabsize: int = ...) -> _UST: ...
32 def find(self, sub: Text, start: int = ..., end: int = ...) -> int: ...
33 def index(self, sub: Text, start: int = ..., end: int = ...) -> int: ...
34 def isalpha(self) -> bool: ...
35 def isalnum(self) -> bool: ...
36 def isdecimal(self) -> bool: ...
37 def isdigit(self) -> bool: ...
38 def islower(self) -> bool: ...
39 def isnumeric(self) -> bool: ...
40 def isspace(self) -> bool: ...
41 def istitle(self) -> bool: ...
42 def isupper(self) -> bool: ...
43 def join(self, seq: Iterable[Text]) -> Text: ...
44 def ljust(self: _UST, width: int, *args: Any) -> _UST: ...
45 def lower(self: _UST) -> _UST: ...
46 def lstrip(self: _UST, chars: Optional[Text] = ...) -> _UST: ...
47 def partition(self, sep: Text) -> Tuple[Text, Text, Text]: ...
48 def replace(self: _UST, old: Text, new: Text, maxsplit: int = ...) -> _UST: ...
49 def rfind(self, sub: Text, start: int = ..., end: int = ...) -> int: ...
50 def rindex(self, sub: Text, start: int = ..., end: int = ...) -> int: ...
51 def rjust(self: _UST, width: int, *args: Any) -> _UST: ...
52 def rpartition(self, sep: Text) -> Tuple[Text, Text, Text]: ...
53 def rstrip(self: _UST, chars: Optional[Text] = ...) -> _UST: ...
54 def split(self, sep: Optional[Text] = ..., maxsplit: int = ...) -> List[Text]: ...
55 def rsplit(self, sep: Optional[Text] = ..., maxsplit: int = ...) -> List[Text]: ...
56 def splitlines(self, keepends: int = ...) -> List[Text]: ...
57 def startswith(self, suffix: Text, start: int = ..., end: int = ...) -> bool: ...
58 def strip(self: _UST, chars: Optional[Text] = ...) -> _UST: ...
59 def swapcase(self: _UST) -> _UST: ...
60 def title(self: _UST) -> _UST: ...
61 def translate(self: _UST, *args: Any) -> _UST: ...
62 def upper(self: _UST) -> _UST: ...
63 def zfill(self: _UST, width: int) -> _UST: ...
64
65 class MutableString(UserString, MutableSequence[MutableString]):
66 @overload
67 def __getitem__(self: _MST, i: int) -> _MST: ...
68 @overload
69 def __getitem__(self: _MST, s: slice) -> _MST: ...
70 def __setitem__(self, index: Union[int, slice], sub: Any) -> None: ...
71 def __delitem__(self, index: Union[int, slice]) -> None: ...
72 def immutable(self) -> UserString: ...
73 def __iadd__(self: _MST, other: Any) -> _MST: ...
74 def __imul__(self, n: int) -> _MST: ...
75 def insert(self, index: int, value: Any) -> None: ...
76