Format: application/octet-stream
1 import sys
2 from decimal import Decimal
3 from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
4
5 # workaround for mypy#2010
6 if sys.version_info < (3,):
7 from __builtin__ import str as _str
8 else:
9 from builtins import str as _str
10
11 CODESET: int
12 D_T_FMT: int
13 D_FMT: int
14 T_FMT: int
15 T_FMT_AMPM: int
16
17 DAY_1: int
18 DAY_2: int
19 DAY_3: int
20 DAY_4: int
21 DAY_5: int
22 DAY_6: int
23 DAY_7: int
24 ABDAY_1: int
25 ABDAY_2: int
26 ABDAY_3: int
27 ABDAY_4: int
28 ABDAY_5: int
29 ABDAY_6: int
30 ABDAY_7: int
31
32 MON_1: int
33 MON_2: int
34 MON_3: int
35 MON_4: int
36 MON_5: int
37 MON_6: int
38 MON_7: int
39 MON_8: int
40 MON_9: int
41 MON_10: int
42 MON_11: int
43 MON_12: int
44 ABMON_1: int
45 ABMON_2: int
46 ABMON_3: int
47 ABMON_4: int
48 ABMON_5: int
49 ABMON_6: int
50 ABMON_7: int
51 ABMON_8: int
52 ABMON_9: int
53 ABMON_10: int
54 ABMON_11: int
55 ABMON_12: int
56
57 RADIXCHAR: int
58 THOUSEP: int
59 YESEXPR: int
60 NOEXPR: int
61 CRNCYSTR: int
62
63 ERA: int
64 ERA_D_T_FMT: int
65 ERA_D_FMT: int
66 ERA_T_FMT: int
67
68 ALT_DIGITS: int
69
70 LC_CTYPE: int
71 LC_COLLATE: int
72 LC_TIME: int
73 LC_MONETARY: int
74 LC_MESSAGES: int
75 LC_NUMERIC: int
76 LC_ALL: int
77
78 CHAR_MAX: int
79
80 class Error(Exception): ...
81
82 def setlocale(category: int, locale: Union[_str, Iterable[_str], None] = ...) -> _str: ...
83 def localeconv() -> Mapping[_str, Union[int, _str, List[int]]]: ...
84 def nl_langinfo(option: int) -> _str: ...
85 def getdefaultlocale(envvars: Tuple[_str, ...] = ...) -> Tuple[Optional[_str], Optional[_str]]: ...
86 def getlocale(category: int = ...) -> Sequence[_str]: ...
87 def getpreferredencoding(do_setlocale: bool = ...) -> _str: ...
88 def normalize(localename: _str) -> _str: ...
89 def resetlocale(category: int = ...) -> None: ...
90 def strcoll(string1: _str, string2: _str) -> int: ...
91 def strxfrm(string: _str) -> _str: ...
92 def format(percent: _str, value: Union[float, Decimal], grouping: bool = ..., monetary: bool = ..., *additional: Any) -> _str: ...
93
94 if sys.version_info >= (3, 7):
95 def format_string(f: _str, val: Any, grouping: bool = ..., monetary: bool = ...) -> _str: ...
96
97 else:
98 def format_string(f: _str, val: Any, grouping: bool = ...) -> _str: ...
99
100 def currency(val: Union[int, float, Decimal], symbol: bool = ..., grouping: bool = ..., international: bool = ...) -> _str: ...
101
102 if sys.version_info >= (3, 5):
103 def delocalize(string: _str) -> _str: ...
104
105 def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ...
106 def atoi(string: _str) -> int: ...
107 def str(val: float) -> _str: ...
108
109 locale_alias: Dict[_str, _str] # undocumented
110 locale_encoding_alias: Dict[_str, _str] # undocumented
111 windows_locale: Dict[int, _str] # undocumented
112