basedpyright 1.24.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.LICENSE.txt +42 -0
  3. package/dist/pyright-langserver.js.map +1 -1
  4. package/dist/pyright.js +1 -1
  5. package/dist/pyright.js.map +1 -1
  6. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +3 -25
  7. package/dist/typeshed-fallback/stdlib/_bisect.pyi +4 -44
  8. package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
  9. package/dist/typeshed-fallback/stdlib/_csv.pyi +2 -16
  10. package/dist/typeshed-fallback/stdlib/_dbm.pyi +1 -13
  11. package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
  12. package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
  13. package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
  14. package/dist/typeshed-fallback/stdlib/_gdbm.pyi +1 -39
  15. package/dist/typeshed-fallback/stdlib/_hashlib.pyi +7 -28
  16. package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -3
  17. package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
  18. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +6 -48
  19. package/dist/typeshed-fallback/stdlib/_ssl.pyi +1 -8
  20. package/dist/typeshed-fallback/stdlib/_thread.pyi +1 -8
  21. package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -6
  22. package/dist/typeshed-fallback/stdlib/aifc.pyi +91 -91
  23. package/dist/typeshed-fallback/stdlib/array.pyi +3 -17
  24. package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
  25. package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +4 -23
  26. package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
  27. package/dist/typeshed-fallback/stdlib/audioop.pyi +43 -95
  28. package/dist/typeshed-fallback/stdlib/binascii.pyi +5 -15
  29. package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
  30. package/dist/typeshed-fallback/stdlib/builtins.pyi +8 -106
  31. package/dist/typeshed-fallback/stdlib/cgi.pyi +118 -118
  32. package/dist/typeshed-fallback/stdlib/cgitb.pyi +32 -32
  33. package/dist/typeshed-fallback/stdlib/chunk.pyi +20 -20
  34. package/dist/typeshed-fallback/stdlib/datetime.pyi +4 -12
  35. package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
  36. package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
  37. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
  38. package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
  39. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +176 -176
  40. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
  41. package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
  42. package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
  43. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
  44. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
  45. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
  46. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
  47. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
  48. package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
  49. package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
  50. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
  51. package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
  52. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
  53. package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
  54. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
  55. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
  56. package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
  57. package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
  58. package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
  59. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
  60. package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
  61. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
  62. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
  63. package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
  64. package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
  65. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
  66. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
  67. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
  68. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
  69. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
  70. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +317 -317
  71. package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
  72. package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
  73. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
  74. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
  75. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
  76. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +26 -26
  77. package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
  78. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -10
  79. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
  80. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
  81. package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
  82. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +53 -53
  83. package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
  84. package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
  85. package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -21
  86. package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
  87. package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -30
  88. package/dist/typeshed-fallback/stdlib/imghdr.pyi +17 -17
  89. package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
  90. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +7 -36
  91. package/dist/typeshed-fallback/stdlib/lib2to3/btm_matcher.pyi +28 -28
  92. package/dist/typeshed-fallback/stdlib/lib2to3/fixer_base.pyi +42 -42
  93. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.pyi +8 -8
  94. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -10
  95. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -8
  96. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -8
  97. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.pyi +16 -16
  98. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.pyi +14 -14
  99. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.pyi +8 -8
  100. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -8
  101. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -13
  102. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.pyi +9 -9
  103. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -8
  104. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.pyi +8 -8
  105. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -8
  106. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -8
  107. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -15
  108. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.pyi +16 -16
  109. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.pyi +21 -21
  110. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -8
  111. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.pyi +11 -11
  112. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.pyi +9 -9
  113. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -8
  114. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -9
  115. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -7
  116. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.pyi +7 -7
  117. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.pyi +9 -9
  118. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -17
  119. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -10
  120. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.pyi +8 -8
  121. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.pyi +19 -19
  122. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -8
  123. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -8
  124. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.pyi +12 -12
  125. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.pyi +8 -8
  126. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.pyi +12 -12
  127. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.pyi +8 -8
  128. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -8
  129. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -8
  130. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.pyi +9 -9
  131. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.pyi +17 -17
  132. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.pyi +8 -8
  133. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -7
  134. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -8
  135. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -9
  136. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.pyi +8 -8
  137. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -17
  138. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.pyi +8 -8
  139. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -12
  140. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -15
  141. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -12
  142. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -20
  143. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -8
  144. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.pyi +9 -9
  145. package/dist/typeshed-fallback/stdlib/lib2to3/main.pyi +42 -42
  146. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.pyi +9 -9
  147. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/driver.pyi +27 -27
  148. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.pyi +24 -24
  149. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/literals.pyi +7 -7
  150. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/parse.pyi +30 -30
  151. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +50 -50
  152. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/token.pyi +69 -69
  153. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.pyi +96 -96
  154. package/dist/typeshed-fallback/stdlib/lib2to3/pygram.pyi +114 -114
  155. package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +117 -127
  156. package/dist/typeshed-fallback/stdlib/lib2to3/refactor.pyi +82 -82
  157. package/dist/typeshed-fallback/stdlib/mailcap.pyi +11 -11
  158. package/dist/typeshed-fallback/stdlib/marshal.pyi +4 -52
  159. package/dist/typeshed-fallback/stdlib/math.pyi +2 -6
  160. package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
  161. package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
  162. package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
  163. package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
  164. package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
  165. package/dist/typeshed-fallback/stdlib/nntplib.pyi +125 -125
  166. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -8
  167. package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
  168. package/dist/typeshed-fallback/stdlib/pipes.pyi +16 -16
  169. package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
  170. package/dist/typeshed-fallback/stdlib/sndhdr.pyi +14 -14
  171. package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
  172. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +2 -6
  173. package/dist/typeshed-fallback/stdlib/ssl.pyi +0 -4
  174. package/dist/typeshed-fallback/stdlib/sunau.pyi +86 -86
  175. package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
  176. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +4 -40
  177. package/dist/typeshed-fallback/stdlib/telnetlib.pyi +123 -123
  178. package/dist/typeshed-fallback/stdlib/tkinter/tix.pyi +299 -299
  179. package/dist/typeshed-fallback/stdlib/types.pyi +2 -6
  180. package/dist/typeshed-fallback/stdlib/typing.pyi +2 -6
  181. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +544 -559
  182. package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +1 -6
  183. package/dist/typeshed-fallback/stdlib/uu.pyi +13 -13
  184. package/dist/typeshed-fallback/stdlib/xdrlib.pyi +57 -57
  185. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
  186. package/dist/typeshed-fallback/stdlib/zipimport.pyi +0 -29
  187. package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -10
  188. package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +3 -9
  189. package/package.json +1 -1
@@ -1,118 +1,118 @@
1
- from _typeshed import SupportsContainsAndGetItem, SupportsGetItem, SupportsItemAccess, Unused
2
- from builtins import list as _list, type as _type
3
- from collections.abc import Iterable, Iterator, Mapping
4
- from email.message import Message
5
- from types import TracebackType
6
- from typing import IO, Any, Protocol
7
- from typing_extensions import Self
8
-
9
- __all__ = [
10
- "MiniFieldStorage",
11
- "FieldStorage",
12
- "parse",
13
- "parse_multipart",
14
- "parse_header",
15
- "test",
16
- "print_exception",
17
- "print_environ",
18
- "print_form",
19
- "print_directory",
20
- "print_arguments",
21
- "print_environ_usage",
22
- ]
23
-
24
- def parse(
25
- fp: IO[Any] | None = None,
26
- environ: SupportsItemAccess[str, str] = ...,
27
- keep_blank_values: bool = ...,
28
- strict_parsing: bool = ...,
29
- separator: str = "&",
30
- ) -> dict[str, list[str]]: ...
31
- def parse_multipart(
32
- fp: IO[Any], pdict: SupportsGetItem[str, bytes], encoding: str = "utf-8", errors: str = "replace", separator: str = "&"
33
- ) -> dict[str, list[Any]]: ...
34
-
35
- class _Environ(Protocol):
36
- def __getitem__(self, k: str, /) -> str: ...
37
- def keys(self) -> Iterable[str]: ...
38
-
39
- def parse_header(line: str) -> tuple[str, dict[str, str]]: ...
40
- def test(environ: _Environ = ...) -> None: ...
41
- def print_environ(environ: _Environ = ...) -> None: ...
42
- def print_form(form: dict[str, Any]) -> None: ...
43
- def print_directory() -> None: ...
44
- def print_environ_usage() -> None: ...
45
-
46
- class MiniFieldStorage:
47
- # The first five "Any" attributes here are always None, but mypy doesn't support that
48
- filename: Any
49
- list: Any
50
- type: Any
51
- file: IO[bytes] | None
52
- type_options: dict[Any, Any]
53
- disposition: Any
54
- disposition_options: dict[Any, Any]
55
- headers: dict[Any, Any]
56
- name: Any
57
- value: Any
58
- def __init__(self, name: Any, value: Any) -> None: ...
59
-
60
- class FieldStorage:
61
- FieldStorageClass: _type | None
62
- keep_blank_values: int
63
- strict_parsing: int
64
- qs_on_post: str | None
65
- headers: Mapping[str, str] | Message
66
- fp: IO[bytes]
67
- encoding: str
68
- errors: str
69
- outerboundary: bytes
70
- bytes_read: int
71
- limit: int | None
72
- disposition: str
73
- disposition_options: dict[str, str]
74
- filename: str | None
75
- file: IO[bytes] | None
76
- type: str
77
- type_options: dict[str, str]
78
- innerboundary: bytes
79
- length: int
80
- done: int
81
- list: _list[Any] | None
82
- value: None | bytes | _list[Any]
83
- def __init__(
84
- self,
85
- fp: IO[Any] | None = None,
86
- headers: Mapping[str, str] | Message | None = None,
87
- outerboundary: bytes = b"",
88
- environ: SupportsContainsAndGetItem[str, str] = ...,
89
- keep_blank_values: int = 0,
90
- strict_parsing: int = 0,
91
- limit: int | None = None,
92
- encoding: str = "utf-8",
93
- errors: str = "replace",
94
- max_num_fields: int | None = None,
95
- separator: str = "&",
96
- ) -> None: ...
97
- def __enter__(self) -> Self: ...
98
- def __exit__(self, *args: Unused) -> None: ...
99
- def __iter__(self) -> Iterator[str]: ...
100
- def __getitem__(self, key: str) -> Any: ...
101
- def getvalue(self, key: str, default: Any = None) -> Any: ...
102
- def getfirst(self, key: str, default: Any = None) -> Any: ...
103
- def getlist(self, key: str) -> _list[Any]: ...
104
- def keys(self) -> _list[str]: ...
105
- def __contains__(self, key: str) -> bool: ...
106
- def __len__(self) -> int: ...
107
- def __bool__(self) -> bool: ...
108
- def __del__(self) -> None: ...
109
- # Returns bytes or str IO depending on an internal flag
110
- def make_file(self) -> IO[Any]: ...
111
-
112
- def print_exception(
113
- type: type[BaseException] | None = None,
114
- value: BaseException | None = None,
115
- tb: TracebackType | None = None,
116
- limit: int | None = None,
117
- ) -> None: ...
118
- def print_arguments() -> None: ...
1
+ from _typeshed import SupportsContainsAndGetItem, SupportsGetItem, SupportsItemAccess, Unused
2
+ from builtins import list as _list, type as _type
3
+ from collections.abc import Iterable, Iterator, Mapping
4
+ from email.message import Message
5
+ from types import TracebackType
6
+ from typing import IO, Any, Protocol
7
+ from typing_extensions import Self
8
+
9
+ __all__ = [
10
+ "MiniFieldStorage",
11
+ "FieldStorage",
12
+ "parse",
13
+ "parse_multipart",
14
+ "parse_header",
15
+ "test",
16
+ "print_exception",
17
+ "print_environ",
18
+ "print_form",
19
+ "print_directory",
20
+ "print_arguments",
21
+ "print_environ_usage",
22
+ ]
23
+
24
+ def parse(
25
+ fp: IO[Any] | None = None,
26
+ environ: SupportsItemAccess[str, str] = ...,
27
+ keep_blank_values: bool = ...,
28
+ strict_parsing: bool = ...,
29
+ separator: str = "&",
30
+ ) -> dict[str, list[str]]: ...
31
+ def parse_multipart(
32
+ fp: IO[Any], pdict: SupportsGetItem[str, bytes], encoding: str = "utf-8", errors: str = "replace", separator: str = "&"
33
+ ) -> dict[str, list[Any]]: ...
34
+
35
+ class _Environ(Protocol):
36
+ def __getitem__(self, k: str, /) -> str: ...
37
+ def keys(self) -> Iterable[str]: ...
38
+
39
+ def parse_header(line: str) -> tuple[str, dict[str, str]]: ...
40
+ def test(environ: _Environ = ...) -> None: ...
41
+ def print_environ(environ: _Environ = ...) -> None: ...
42
+ def print_form(form: dict[str, Any]) -> None: ...
43
+ def print_directory() -> None: ...
44
+ def print_environ_usage() -> None: ...
45
+
46
+ class MiniFieldStorage:
47
+ # The first five "Any" attributes here are always None, but mypy doesn't support that
48
+ filename: Any
49
+ list: Any
50
+ type: Any
51
+ file: IO[bytes] | None
52
+ type_options: dict[Any, Any]
53
+ disposition: Any
54
+ disposition_options: dict[Any, Any]
55
+ headers: dict[Any, Any]
56
+ name: Any
57
+ value: Any
58
+ def __init__(self, name: Any, value: Any) -> None: ...
59
+
60
+ class FieldStorage:
61
+ FieldStorageClass: _type | None
62
+ keep_blank_values: int
63
+ strict_parsing: int
64
+ qs_on_post: str | None
65
+ headers: Mapping[str, str] | Message
66
+ fp: IO[bytes]
67
+ encoding: str
68
+ errors: str
69
+ outerboundary: bytes
70
+ bytes_read: int
71
+ limit: int | None
72
+ disposition: str
73
+ disposition_options: dict[str, str]
74
+ filename: str | None
75
+ file: IO[bytes] | None
76
+ type: str
77
+ type_options: dict[str, str]
78
+ innerboundary: bytes
79
+ length: int
80
+ done: int
81
+ list: _list[Any] | None
82
+ value: None | bytes | _list[Any]
83
+ def __init__(
84
+ self,
85
+ fp: IO[Any] | None = None,
86
+ headers: Mapping[str, str] | Message | None = None,
87
+ outerboundary: bytes = b"",
88
+ environ: SupportsContainsAndGetItem[str, str] = ...,
89
+ keep_blank_values: int = 0,
90
+ strict_parsing: int = 0,
91
+ limit: int | None = None,
92
+ encoding: str = "utf-8",
93
+ errors: str = "replace",
94
+ max_num_fields: int | None = None,
95
+ separator: str = "&",
96
+ ) -> None: ...
97
+ def __enter__(self) -> Self: ...
98
+ def __exit__(self, *args: Unused) -> None: ...
99
+ def __iter__(self) -> Iterator[str]: ...
100
+ def __getitem__(self, key: str) -> Any: ...
101
+ def getvalue(self, key: str, default: Any = None) -> Any: ...
102
+ def getfirst(self, key: str, default: Any = None) -> Any: ...
103
+ def getlist(self, key: str) -> _list[Any]: ...
104
+ def keys(self) -> _list[str]: ...
105
+ def __contains__(self, key: str) -> bool: ...
106
+ def __len__(self) -> int: ...
107
+ def __bool__(self) -> bool: ...
108
+ def __del__(self) -> None: ...
109
+ # Returns bytes or str IO depending on an internal flag
110
+ def make_file(self) -> IO[Any]: ...
111
+
112
+ def print_exception(
113
+ type: type[BaseException] | None = None,
114
+ value: BaseException | None = None,
115
+ tb: TracebackType | None = None,
116
+ limit: int | None = None,
117
+ ) -> None: ...
118
+ def print_arguments() -> None: ...
@@ -1,32 +1,32 @@
1
- from _typeshed import OptExcInfo, StrOrBytesPath
2
- from collections.abc import Callable
3
- from types import FrameType, TracebackType
4
- from typing import IO, Any, Final
5
-
6
- __UNDEF__: Final[object] # undocumented sentinel
7
-
8
- def reset() -> str: ... # undocumented
9
- def small(text: str) -> str: ... # undocumented
10
- def strong(text: str) -> str: ... # undocumented
11
- def grey(text: str) -> str: ... # undocumented
12
- def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... # undocumented
13
- def scanvars(
14
- reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any]
15
- ) -> list[tuple[str, str | None, Any]]: ... # undocumented
16
- def html(einfo: OptExcInfo, context: int = 5) -> str: ...
17
- def text(einfo: OptExcInfo, context: int = 5) -> str: ...
18
-
19
- class Hook: # undocumented
20
- def __init__(
21
- self,
22
- display: int = 1,
23
- logdir: StrOrBytesPath | None = None,
24
- context: int = 5,
25
- file: IO[str] | None = None,
26
- format: str = "html",
27
- ) -> None: ...
28
- def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
29
- def handle(self, info: OptExcInfo | None = None) -> None: ...
30
-
31
- def handler(info: OptExcInfo | None = None) -> None: ...
32
- def enable(display: int = 1, logdir: StrOrBytesPath | None = None, context: int = 5, format: str = "html") -> None: ...
1
+ from _typeshed import OptExcInfo, StrOrBytesPath
2
+ from collections.abc import Callable
3
+ from types import FrameType, TracebackType
4
+ from typing import IO, Any, Final
5
+
6
+ __UNDEF__: Final[object] # undocumented sentinel
7
+
8
+ def reset() -> str: ... # undocumented
9
+ def small(text: str) -> str: ... # undocumented
10
+ def strong(text: str) -> str: ... # undocumented
11
+ def grey(text: str) -> str: ... # undocumented
12
+ def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... # undocumented
13
+ def scanvars(
14
+ reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any]
15
+ ) -> list[tuple[str, str | None, Any]]: ... # undocumented
16
+ def html(einfo: OptExcInfo, context: int = 5) -> str: ...
17
+ def text(einfo: OptExcInfo, context: int = 5) -> str: ...
18
+
19
+ class Hook: # undocumented
20
+ def __init__(
21
+ self,
22
+ display: int = 1,
23
+ logdir: StrOrBytesPath | None = None,
24
+ context: int = 5,
25
+ file: IO[str] | None = None,
26
+ format: str = "html",
27
+ ) -> None: ...
28
+ def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
29
+ def handle(self, info: OptExcInfo | None = None) -> None: ...
30
+
31
+ def handler(info: OptExcInfo | None = None) -> None: ...
32
+ def enable(display: int = 1, logdir: StrOrBytesPath | None = None, context: int = 5, format: str = "html") -> None: ...
@@ -1,20 +1,20 @@
1
- from typing import IO
2
-
3
- class Chunk:
4
- closed: bool
5
- align: bool
6
- file: IO[bytes]
7
- chunkname: bytes
8
- chunksize: int
9
- size_read: int
10
- offset: int
11
- seekable: bool
12
- def __init__(self, file: IO[bytes], align: bool = True, bigendian: bool = True, inclheader: bool = False) -> None: ...
13
- def getname(self) -> bytes: ...
14
- def getsize(self) -> int: ...
15
- def close(self) -> None: ...
16
- def isatty(self) -> bool: ...
17
- def seek(self, pos: int, whence: int = 0) -> None: ...
18
- def tell(self) -> int: ...
19
- def read(self, size: int = -1) -> bytes: ...
20
- def skip(self) -> None: ...
1
+ from typing import IO
2
+
3
+ class Chunk:
4
+ closed: bool
5
+ align: bool
6
+ file: IO[bytes]
7
+ chunkname: bytes
8
+ chunksize: int
9
+ size_read: int
10
+ offset: int
11
+ seekable: bool
12
+ def __init__(self, file: IO[bytes], align: bool = True, bigendian: bool = True, inclheader: bool = False) -> None: ...
13
+ def getname(self) -> bytes: ...
14
+ def getsize(self) -> int: ...
15
+ def close(self) -> None: ...
16
+ def isatty(self) -> bool: ...
17
+ def seek(self, pos: int, whence: int = 0) -> None: ...
18
+ def tell(self) -> int: ...
19
+ def read(self, size: int = -1) -> bytes: ...
20
+ def skip(self) -> None: ...
@@ -121,9 +121,7 @@ class date:
121
121
  """format -> strftime() style string."""
122
122
  ...
123
123
  else:
124
- def strftime(self, format: str, /) -> str:
125
- """format -> strftime() style string."""
126
- ...
124
+ def strftime(self, format: str, /) -> str: ...
127
125
 
128
126
  def __format__(self, fmt: str, /) -> str:
129
127
  """Formats self with strftime."""
@@ -198,9 +196,7 @@ class date:
198
196
  """Return a named tuple containing ISO year, week number, and weekday."""
199
197
  ...
200
198
  else:
201
- def isocalendar(self) -> tuple[int, int, int]:
202
- """Return a 3-tuple containing ISO year, week number, and weekday."""
203
- ...
199
+ def isocalendar(self) -> tuple[int, int, int]: ...
204
200
 
205
201
  class time:
206
202
  min: ClassVar[time]
@@ -267,9 +263,7 @@ class time:
267
263
  """format -> strftime() style string."""
268
264
  ...
269
265
  else:
270
- def strftime(self, format: str, /) -> str:
271
- """format -> strftime() style string."""
272
- ...
266
+ def strftime(self, format: str, /) -> str: ...
273
267
 
274
268
  def __format__(self, fmt: str, /) -> str:
275
269
  """Formats self with strftime."""
@@ -452,9 +446,7 @@ class datetime(date):
452
446
  ...
453
447
  else:
454
448
  @classmethod
455
- def fromtimestamp(cls, timestamp: float, /, tz: _TzInfo | None = ...) -> Self:
456
- """timestamp[, tz] -> tz's local time from POSIX timestamp."""
457
- ...
449
+ def fromtimestamp(cls, timestamp: float, /, tz: _TzInfo | None = ...) -> Self: ...
458
450
 
459
451
  @classmethod
460
452
  @deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .fromtimestamp(datetime.timezone.utc)")
@@ -1,5 +1,5 @@
1
- # Attempts to improve these stubs are probably not the best use of time:
2
- # - distutils is deleted in Python 3.12 and newer
3
- # - Most users already do not use stdlib distutils, due to setuptools monkeypatching
4
- # - We have very little quality assurance on these stubs, since due to the two above issues
5
- # we allowlist all distutils errors in stubtest.
1
+ # Attempts to improve these stubs are probably not the best use of time:
2
+ # - distutils is deleted in Python 3.12 and newer
3
+ # - Most users already do not use stdlib distutils, due to setuptools monkeypatching
4
+ # - We have very little quality assurance on these stubs, since due to the two above issues
5
+ # we allowlist all distutils errors in stubtest.
@@ -1,13 +1,13 @@
1
- from _typeshed import Incomplete
2
- from distutils.ccompiler import CCompiler
3
- from typing import ClassVar, Final
4
-
5
- PLAT_SPEC_TO_RUNTIME: Final[dict[str, str]]
6
- PLAT_TO_VCVARS: Final[dict[str, str]]
7
-
8
- class MSVCCompiler(CCompiler):
9
- compiler_type: ClassVar[str]
10
- executables: ClassVar[dict[Incomplete, Incomplete]]
11
- res_extension: ClassVar[str]
12
- initialized: bool
13
- def initialize(self, plat_name: str | None = None) -> None: ...
1
+ from _typeshed import Incomplete
2
+ from distutils.ccompiler import CCompiler
3
+ from typing import ClassVar, Final
4
+
5
+ PLAT_SPEC_TO_RUNTIME: Final[dict[str, str]]
6
+ PLAT_TO_VCVARS: Final[dict[str, str]]
7
+
8
+ class MSVCCompiler(CCompiler):
9
+ compiler_type: ClassVar[str]
10
+ executables: ClassVar[dict[Incomplete, Incomplete]]
11
+ res_extension: ClassVar[str]
12
+ initialized: bool
13
+ def initialize(self, plat_name: str | None = None) -> None: ...
@@ -1,35 +1,35 @@
1
- from _typeshed import StrOrBytesPath, StrPath
2
- from typing import Literal, overload
3
-
4
- @overload
5
- def make_archive(
6
- base_name: str,
7
- format: str,
8
- root_dir: StrOrBytesPath | None = None,
9
- base_dir: str | None = None,
10
- verbose: bool | Literal[0, 1] = 0,
11
- dry_run: bool | Literal[0, 1] = 0,
12
- owner: str | None = None,
13
- group: str | None = None,
14
- ) -> str: ...
15
- @overload
16
- def make_archive(
17
- base_name: StrPath,
18
- format: str,
19
- root_dir: StrOrBytesPath,
20
- base_dir: str | None = None,
21
- verbose: bool | Literal[0, 1] = 0,
22
- dry_run: bool | Literal[0, 1] = 0,
23
- owner: str | None = None,
24
- group: str | None = None,
25
- ) -> str: ...
26
- def make_tarball(
27
- base_name: str,
28
- base_dir: StrPath,
29
- compress: str | None = "gzip",
30
- verbose: bool | Literal[0, 1] = 0,
31
- dry_run: bool | Literal[0, 1] = 0,
32
- owner: str | None = None,
33
- group: str | None = None,
34
- ) -> str: ...
35
- def make_zipfile(base_name: str, base_dir: str, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0) -> str: ...
1
+ from _typeshed import StrOrBytesPath, StrPath
2
+ from typing import Literal, overload
3
+
4
+ @overload
5
+ def make_archive(
6
+ base_name: str,
7
+ format: str,
8
+ root_dir: StrOrBytesPath | None = None,
9
+ base_dir: str | None = None,
10
+ verbose: bool | Literal[0, 1] = 0,
11
+ dry_run: bool | Literal[0, 1] = 0,
12
+ owner: str | None = None,
13
+ group: str | None = None,
14
+ ) -> str: ...
15
+ @overload
16
+ def make_archive(
17
+ base_name: StrPath,
18
+ format: str,
19
+ root_dir: StrOrBytesPath,
20
+ base_dir: str | None = None,
21
+ verbose: bool | Literal[0, 1] = 0,
22
+ dry_run: bool | Literal[0, 1] = 0,
23
+ owner: str | None = None,
24
+ group: str | None = None,
25
+ ) -> str: ...
26
+ def make_tarball(
27
+ base_name: str,
28
+ base_dir: StrPath,
29
+ compress: str | None = "gzip",
30
+ verbose: bool | Literal[0, 1] = 0,
31
+ dry_run: bool | Literal[0, 1] = 0,
32
+ owner: str | None = None,
33
+ group: str | None = None,
34
+ ) -> str: ...
35
+ def make_zipfile(base_name: str, base_dir: str, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0) -> str: ...
@@ -1,3 +1,3 @@
1
- from distutils.ccompiler import CCompiler
2
-
3
- class BCPPCompiler(CCompiler): ...
1
+ from distutils.ccompiler import CCompiler
2
+
3
+ class BCPPCompiler(CCompiler): ...