basedpyright 1.13.2 → 1.13.3

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 (229) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/commit.txt +1 -1
  6. package/dist/typeshed-fallback/stdlib/VERSIONS +2 -0
  7. package/dist/typeshed-fallback/stdlib/_ast.pyi +42 -279
  8. package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
  9. package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
  10. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +15 -5
  11. package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
  12. package/dist/typeshed-fallback/stdlib/_decimal.pyi +0 -18
  13. package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
  14. package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +180 -164
  15. package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
  16. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +16 -0
  17. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +50 -0
  18. package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
  19. package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
  20. package/dist/typeshed-fallback/stdlib/_msi.pyi +94 -92
  21. package/dist/typeshed-fallback/stdlib/_operator.pyi +0 -24
  22. package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
  23. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +6 -2
  24. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +7 -1
  25. package/dist/typeshed-fallback/stdlib/abc.pyi +12 -4
  26. package/dist/typeshed-fallback/stdlib/argparse.pyi +3 -1
  27. package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
  28. package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
  29. package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +35 -4
  30. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +107 -15
  31. package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +9 -3
  32. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +10 -2
  33. package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +23 -4
  34. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +107 -12
  35. package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +86 -86
  36. package/dist/typeshed-fallback/stdlib/asyncio/windows_utils.pyi +49 -49
  37. package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
  38. package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
  39. package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
  40. package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
  41. package/dist/typeshed-fallback/stdlib/builtins.pyi +0 -1
  42. package/dist/typeshed-fallback/stdlib/bz2.pyi +59 -6
  43. package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
  44. package/dist/typeshed-fallback/stdlib/codecs.pyi +18 -6
  45. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +200 -56
  46. package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +33 -14
  47. package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +7 -1
  48. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +7 -1
  49. package/dist/typeshed-fallback/stdlib/contextvars.pyi +99 -16
  50. package/dist/typeshed-fallback/stdlib/csv.pyi +14 -2
  51. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +7 -1
  52. package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +6 -2
  53. package/dist/typeshed-fallback/stdlib/curses/panel.pyi +16 -4
  54. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +7 -1
  55. package/dist/typeshed-fallback/stdlib/datetime.pyi +346 -104
  56. package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +52 -2
  57. package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +26 -2
  58. package/dist/typeshed-fallback/stdlib/difflib.pyi +7 -1
  59. package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
  60. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
  61. package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
  62. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +173 -173
  63. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +99 -99
  64. package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +25 -25
  65. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +21 -21
  66. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +45 -45
  67. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +52 -52
  68. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
  69. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +33 -33
  70. package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +27 -27
  71. package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +50 -50
  72. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +44 -44
  73. package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +24 -24
  74. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +39 -39
  75. package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +17 -17
  76. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
  77. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +65 -65
  78. package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +19 -19
  79. package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +18 -18
  80. package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +16 -16
  81. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +25 -25
  82. package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +18 -18
  83. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +20 -20
  84. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +44 -44
  85. package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +17 -17
  86. package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
  87. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +57 -57
  88. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
  89. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +1 -1
  90. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
  91. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
  92. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +149 -149
  93. package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
  94. package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
  95. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
  96. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
  97. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
  98. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +25 -25
  99. package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
  100. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +6 -6
  101. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
  102. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
  103. package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
  104. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +50 -50
  105. package/dist/typeshed-fallback/stdlib/distutils/version.pyi +38 -36
  106. package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
  107. package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +3 -1
  108. package/dist/typeshed-fallback/stdlib/email/charset.pyi +3 -1
  109. package/dist/typeshed-fallback/stdlib/email/header.pyi +3 -1
  110. package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +6 -1
  111. package/dist/typeshed-fallback/stdlib/enum.pyi +8 -1
  112. package/dist/typeshed-fallback/stdlib/filecmp.pyi +7 -1
  113. package/dist/typeshed-fallback/stdlib/fileinput.pyi +7 -1
  114. package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
  115. package/dist/typeshed-fallback/stdlib/fractions.pyi +6 -2
  116. package/dist/typeshed-fallback/stdlib/functools.pyi +65 -13
  117. package/dist/typeshed-fallback/stdlib/graphlib.pyi +7 -1
  118. package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -1
  119. package/dist/typeshed-fallback/stdlib/hashlib.pyi +42 -14
  120. package/dist/typeshed-fallback/stdlib/heapq.pyi +3 -1
  121. package/dist/typeshed-fallback/stdlib/hmac.pyi +30 -2
  122. package/dist/typeshed-fallback/stdlib/http/cookies.pyi +7 -1
  123. package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
  124. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -1
  125. package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +3 -1
  126. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +79 -15
  127. package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +3 -1
  128. package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +3 -1
  129. package/dist/typeshed-fallback/stdlib/io.pyi +428 -44
  130. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +153 -28
  131. package/dist/typeshed-fallback/stdlib/itertools.pyi +5 -1
  132. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +14 -2
  133. package/dist/typeshed-fallback/stdlib/keyword.pyi +6 -2
  134. package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +12 -2
  135. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +17 -3
  136. package/dist/typeshed-fallback/stdlib/lzma.pyi +107 -9
  137. package/dist/typeshed-fallback/stdlib/mailbox.pyi +14 -2
  138. package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
  139. package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -160
  140. package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
  141. package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
  142. package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
  143. package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
  144. package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +9 -3
  145. package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +12 -2
  146. package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +3 -1
  147. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +10 -2
  148. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +7 -1
  149. package/dist/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -30
  150. package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +15 -4
  151. package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +14 -2
  152. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +19 -5
  153. package/dist/typeshed-fallback/stdlib/nis.pyi +31 -4
  154. package/dist/typeshed-fallback/stdlib/numbers.pyi +26 -6
  155. package/dist/typeshed-fallback/stdlib/opcode.pyi +3 -1
  156. package/dist/typeshed-fallback/stdlib/optparse.pyi +3 -1
  157. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1447 -217
  158. package/dist/typeshed-fallback/stdlib/pathlib.pyi +42 -11
  159. package/dist/typeshed-fallback/stdlib/pickle.pyi +200 -12
  160. package/dist/typeshed-fallback/stdlib/posixpath.pyi +6 -2
  161. package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +2 -0
  162. package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +2 -0
  163. package/dist/typeshed-fallback/stdlib/queue.pyi +57 -9
  164. package/dist/typeshed-fallback/stdlib/re.pyi +219 -57
  165. package/dist/typeshed-fallback/stdlib/sched.pyi +8 -1
  166. package/dist/typeshed-fallback/stdlib/signal.pyi +95 -19
  167. package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
  168. package/dist/typeshed-fallback/stdlib/socket.pyi +12 -2
  169. package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +417 -83
  170. package/dist/typeshed-fallback/stdlib/ssl.pyi +133 -22
  171. package/dist/typeshed-fallback/stdlib/statistics.pyi +20 -5
  172. package/dist/typeshed-fallback/stdlib/struct.pyi +114 -13
  173. package/dist/typeshed-fallback/stdlib/subprocess.pyi +14 -2
  174. package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
  175. package/dist/typeshed-fallback/stdlib/symtable.pyi +30 -1
  176. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +7 -3
  177. package/dist/typeshed-fallback/stdlib/tarfile.pyi +6 -2
  178. package/dist/typeshed-fallback/stdlib/tempfile.pyi +17 -3
  179. package/dist/typeshed-fallback/stdlib/threading.pyi +68 -7
  180. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3 -1
  181. package/dist/typeshed-fallback/stdlib/turtle.pyi +11 -3
  182. package/dist/typeshed-fallback/stdlib/types.pyi +306 -79
  183. package/dist/typeshed-fallback/stdlib/typing.pyi +310 -31
  184. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +42 -11
  185. package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +6 -1
  186. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +7 -1
  187. package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +3 -1
  188. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +51 -3
  189. package/dist/typeshed-fallback/stdlib/weakref.pyi +6 -2
  190. package/dist/typeshed-fallback/stdlib/winsound.pyi +44 -28
  191. package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +6 -2
  192. package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +33 -11
  193. package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +30 -10
  194. package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +2 -0
  195. package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +2 -0
  196. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +19 -4
  197. package/dist/typeshed-fallback/stdlib/zipimport.pyi +31 -0
  198. package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
  199. package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +18 -6
  200. package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +2 -2
  201. package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +18 -1
  202. package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +5 -19
  203. package/dist/typeshed-fallback/stubs/docker/docker/api/daemon.pyi +2 -1
  204. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +268 -6
  205. package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +3 -7
  206. package/dist/typeshed-fallback/stubs/docker/docker/types/daemon.pyi +10 -4
  207. package/dist/typeshed-fallback/stubs/docutils/docutils/parsers/rst/states.pyi +47 -0
  208. package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +1 -1
  209. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +1 -1
  210. package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
  211. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +0 -2
  212. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +2 -1
  213. package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
  214. package/dist/typeshed-fallback/stubs/pytest-lazy-fixture/pytest_lazyfixture.pyi +2 -2
  215. package/dist/typeshed-fallback/stubs/python-crontab/METADATA.toml +1 -1
  216. package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +1 -1
  217. package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +23 -11
  218. package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi +6 -0
  219. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
  220. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +8 -8
  221. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +11 -17
  222. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +11 -11
  223. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +1 -2
  224. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +4 -12
  225. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +2 -4
  226. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +5 -8
  227. package/dist/typeshed-fallback/stubs/str2bool/METADATA.toml +2 -0
  228. package/dist/typeshed-fallback/stubs/str2bool/str2bool/__init__.pyi +7 -0
  229. package/package.json +1 -1
@@ -71,6 +71,20 @@ _VT_co = TypeVar("_VT_co", covariant=True)
71
71
  # Make sure this class definition stays roughly in line with `builtins.function`
72
72
  @final
73
73
  class FunctionType:
74
+ """
75
+ Create a function object.
76
+
77
+ code
78
+ a code object
79
+ globals
80
+ the globals dictionary
81
+ name
82
+ a string that overrides the name from the code object
83
+ argdefs
84
+ a tuple that specifies the default argument values
85
+ closure
86
+ a tuple that supplies the bindings for free variables
87
+ """
74
88
  @property
75
89
  def __closure__(self) -> tuple[CellType, ...] | None: ...
76
90
  __code__: CodeType
@@ -97,18 +111,35 @@ class FunctionType:
97
111
  argdefs: tuple[object, ...] | None = ...,
98
112
  closure: tuple[CellType, ...] | None = ...,
99
113
  ) -> Self: ...
100
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
114
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
115
+ """Call self as a function."""
116
+ ...
101
117
  @overload
102
- def __get__(self, instance: None, owner: type, /) -> FunctionType: ...
118
+ def __get__(self, instance: None, owner: type, /) -> FunctionType:
119
+ """Return an attribute of instance, which is of type owner."""
120
+ ...
103
121
  @overload
104
- def __get__(self, instance: object, owner: type | None = None, /) -> MethodType: ...
122
+ def __get__(self, instance: object, owner: type | None = None, /) -> MethodType:
123
+ """Return an attribute of instance, which is of type owner."""
124
+ ...
105
125
 
106
126
  LambdaType = FunctionType
107
127
 
108
128
  @final
109
129
  class CodeType:
110
- def __eq__(self, value: object, /) -> bool: ...
111
- def __hash__(self) -> int: ...
130
+ """
131
+ code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize,
132
+ flags, codestring, constants, names, varnames, filename, name,
133
+ firstlineno, lnotab[, freevars[, cellvars]])
134
+
135
+ Create a code object. Not for the faint of heart.
136
+ """
137
+ def __eq__(self, value: object, /) -> bool:
138
+ """Return self==value."""
139
+ ...
140
+ def __hash__(self) -> int:
141
+ """Return hash(self)."""
142
+ ...
112
143
  @property
113
144
  def co_argcount(self) -> int: ...
114
145
  @property
@@ -245,7 +276,9 @@ class CodeType:
245
276
  co_qualname: str = ...,
246
277
  co_linetable: bytes = ...,
247
278
  co_exceptiontable: bytes = ...,
248
- ) -> CodeType: ...
279
+ ) -> Self:
280
+ """Return a copy of the code object with new values for the specified fields."""
281
+ ...
249
282
  elif sys.version_info >= (3, 10):
250
283
  def replace(
251
284
  self,
@@ -266,7 +299,9 @@ class CodeType:
266
299
  co_filename: str = ...,
267
300
  co_name: str = ...,
268
301
  co_linetable: bytes = ...,
269
- ) -> CodeType: ...
302
+ ) -> Self:
303
+ """Return a copy of the code object with new values for the specified fields."""
304
+ ...
270
305
  else:
271
306
  def replace(
272
307
  self,
@@ -287,35 +322,79 @@ class CodeType:
287
322
  co_filename: str = ...,
288
323
  co_name: str = ...,
289
324
  co_lnotab: bytes = ...,
290
- ) -> CodeType: ...
325
+ ) -> Self:
326
+ """Return a copy of the code object with new values for the specified fields."""
327
+ ...
328
+
329
+ if sys.version_info >= (3, 13):
330
+ __replace__ = replace
291
331
 
292
332
  @final
293
333
  class MappingProxyType(Mapping[_KT, _VT_co]):
294
334
  __hash__: ClassVar[None] # type: ignore[assignment]
295
335
  def __new__(cls, mapping: SupportsKeysAndGetItem[_KT, _VT_co]) -> Self: ...
296
- def __getitem__(self, key: _KT, /) -> _VT_co: ...
297
- def __iter__(self) -> Iterator[_KT]: ...
298
- def __len__(self) -> int: ...
299
- def __eq__(self, value: object, /) -> bool: ...
300
- def copy(self) -> dict[_KT, _VT_co]: ...
301
- def keys(self) -> KeysView[_KT]: ...
302
- def values(self) -> ValuesView[_VT_co]: ...
303
- def items(self) -> ItemsView[_KT, _VT_co]: ...
336
+ def __getitem__(self, key: _KT, /) -> _VT_co:
337
+ """Return self[key]."""
338
+ ...
339
+ def __iter__(self) -> Iterator[_KT]:
340
+ """Implement iter(self)."""
341
+ ...
342
+ def __len__(self) -> int:
343
+ """Return len(self)."""
344
+ ...
345
+ def __eq__(self, value: object, /) -> bool:
346
+ """Return self==value."""
347
+ ...
348
+ def copy(self) -> dict[_KT, _VT_co]:
349
+ """D.copy() -> a shallow copy of D"""
350
+ ...
351
+ def keys(self) -> KeysView[_KT]:
352
+ """D.keys() -> list of D's keys"""
353
+ ...
354
+ def values(self) -> ValuesView[_VT_co]:
355
+ """D.values() -> list of D's values"""
356
+ ...
357
+ def items(self) -> ItemsView[_KT, _VT_co]:
358
+ """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
359
+ ...
304
360
  if sys.version_info >= (3, 9):
305
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
306
- def __reversed__(self) -> Iterator[_KT]: ...
307
- def __or__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]: ...
308
- def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]: ...
361
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
362
+ """See PEP 585"""
363
+ ...
364
+ def __reversed__(self) -> Iterator[_KT]:
365
+ """D.__reversed__() -> reverse iterator"""
366
+ ...
367
+ def __or__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]:
368
+ """Return self|value."""
369
+ ...
370
+ def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]:
371
+ """Return value|self."""
372
+ ...
309
373
 
310
374
  class SimpleNamespace:
311
375
  __hash__: ClassVar[None] # type: ignore[assignment]
312
376
  def __init__(self, **kwargs: Any) -> None: ...
313
- def __eq__(self, value: object, /) -> bool: ...
314
- def __getattribute__(self, name: str, /) -> Any: ...
315
- def __setattr__(self, name: str, value: Any, /) -> None: ...
316
- def __delattr__(self, name: str, /) -> None: ...
377
+ def __eq__(self, value: object, /) -> bool:
378
+ """Return self==value."""
379
+ ...
380
+ def __getattribute__(self, name: str, /) -> Any:
381
+ """Return getattr(self, name)."""
382
+ ...
383
+ def __setattr__(self, name: str, value: Any, /) -> None:
384
+ """Implement setattr(self, name, value)."""
385
+ ...
386
+ def __delattr__(self, name: str, /) -> None:
387
+ """Implement delattr(self, name)."""
388
+ ...
389
+ if sys.version_info >= (3, 13):
390
+ def __replace__(self, **kwargs: Any) -> Self: ...
317
391
 
318
392
  class ModuleType:
393
+ """
394
+ Create a module object.
395
+
396
+ The name must be a string; the optional doc argument can have any type.
397
+ """
319
398
  __name__: str
320
399
  __file__: str | None
321
400
  @property
@@ -332,6 +411,15 @@ class ModuleType:
332
411
 
333
412
  @final
334
413
  class CellType:
414
+ """
415
+ Create a new cell object.
416
+
417
+ contents
418
+ the contents of the cell. If not specified, the cell will be empty,
419
+ and
420
+ further attempts to access its cell_contents attribute will
421
+ raise a ValueError.
422
+ """
335
423
  def __new__(cls, contents: object = ..., /) -> Self: ...
336
424
  __hash__: ClassVar[None] # type: ignore[assignment]
337
425
  cell_contents: Any
@@ -343,46 +431,83 @@ _ReturnT_co = TypeVar("_ReturnT_co", covariant=True)
343
431
  @final
344
432
  class GeneratorType(Generator[_YieldT_co, _SendT_contra, _ReturnT_co]):
345
433
  @property
346
- def gi_yieldfrom(self) -> GeneratorType[_YieldT_co, _SendT_contra, Any] | None: ...
434
+ def gi_yieldfrom(self) -> GeneratorType[_YieldT_co, _SendT_contra, Any] | None:
435
+ """object being iterated by yield from, or None"""
436
+ ...
347
437
  if sys.version_info >= (3, 11):
348
438
  @property
349
439
  def gi_suspended(self) -> bool: ...
350
440
  __name__: str
351
441
  __qualname__: str
352
- def __iter__(self) -> Self: ...
353
- def __next__(self) -> _YieldT_co: ...
354
- def send(self, arg: _SendT_contra, /) -> _YieldT_co: ...
442
+ def __iter__(self) -> Self:
443
+ """Implement iter(self)."""
444
+ ...
445
+ def __next__(self) -> _YieldT_co:
446
+ """Implement next(self)."""
447
+ ...
448
+ def send(self, arg: _SendT_contra, /) -> _YieldT_co:
449
+ """
450
+ send(arg) -> send 'arg' into generator,
451
+ return next yielded value or raise StopIteration.
452
+ """
453
+ ...
355
454
  @overload
356
455
  def throw(
357
456
  self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ..., /
358
- ) -> _YieldT_co: ...
457
+ ) -> _YieldT_co:
458
+ """
459
+ throw(typ[,val[,tb]]) -> raise exception in generator,
460
+ return next yielded value or raise StopIteration.
461
+ """
462
+ ...
359
463
  @overload
360
- def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co: ...
464
+ def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co:
465
+ """
466
+ throw(typ[,val[,tb]]) -> raise exception in generator,
467
+ return next yielded value or raise StopIteration.
468
+ """
469
+ ...
361
470
  if sys.version_info >= (3, 13):
362
471
  def __class_getitem__(cls, item: Any, /) -> Any: ...
363
472
 
364
473
  @final
365
474
  class AsyncGeneratorType(AsyncGenerator[_YieldT_co, _SendT_contra]):
366
475
  @property
367
- def ag_await(self) -> Awaitable[Any] | None: ...
476
+ def ag_await(self) -> Awaitable[Any] | None:
477
+ """object being awaited on, or None"""
478
+ ...
368
479
  __name__: str
369
480
  __qualname__: str
370
481
  if sys.version_info >= (3, 12):
371
482
  @property
372
483
  def ag_suspended(self) -> bool: ...
373
484
 
374
- def __aiter__(self) -> Self: ...
375
- def __anext__(self) -> Coroutine[Any, Any, _YieldT_co]: ...
376
- def asend(self, val: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
485
+ def __aiter__(self) -> Self:
486
+ """Return an awaitable, that resolves in asynchronous iterator."""
487
+ ...
488
+ def __anext__(self) -> Coroutine[Any, Any, _YieldT_co]:
489
+ """Return a value or raise StopAsyncIteration."""
490
+ ...
491
+ def asend(self, val: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]:
492
+ """asend(v) -> send 'v' in generator."""
493
+ ...
377
494
  @overload
378
495
  async def athrow(
379
496
  self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ..., /
380
- ) -> _YieldT_co: ...
497
+ ) -> _YieldT_co:
498
+ """athrow(typ[,val[,tb]]) -> raise exception in generator."""
499
+ ...
381
500
  @overload
382
- async def athrow(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co: ...
383
- def aclose(self) -> Coroutine[Any, Any, None]: ...
501
+ async def athrow(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co:
502
+ """athrow(typ[,val[,tb]]) -> raise exception in generator."""
503
+ ...
504
+ def aclose(self) -> Coroutine[Any, Any, None]:
505
+ """aclose() -> raise GeneratorExit inside generator."""
506
+ ...
384
507
  if sys.version_info >= (3, 9):
385
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
508
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
509
+ """See PEP 585"""
510
+ ...
386
511
 
387
512
  @final
388
513
  class CoroutineType(Coroutine[_YieldT_co, _SendT_contra, _ReturnT_co]):
@@ -394,36 +519,70 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_contra, _ReturnT_co]):
394
519
  @property
395
520
  def cr_suspended(self) -> bool: ...
396
521
 
397
- def close(self) -> None: ...
398
- def __await__(self) -> Generator[Any, None, _ReturnT_co]: ...
399
- def send(self, arg: _SendT_contra, /) -> _YieldT_co: ...
522
+ def close(self) -> None:
523
+ """close() -> raise GeneratorExit inside coroutine."""
524
+ ...
525
+ def __await__(self) -> Generator[Any, None, _ReturnT_co]:
526
+ """Return an iterator to be used in await expression."""
527
+ ...
528
+ def send(self, arg: _SendT_contra, /) -> _YieldT_co:
529
+ """
530
+ send(arg) -> send 'arg' into coroutine,
531
+ return next iterated value or raise StopIteration.
532
+ """
533
+ ...
400
534
  @overload
401
535
  def throw(
402
536
  self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ..., /
403
- ) -> _YieldT_co: ...
537
+ ) -> _YieldT_co:
538
+ """
539
+ throw(typ[,val[,tb]]) -> raise exception in coroutine,
540
+ return next iterated value or raise StopIteration.
541
+ """
542
+ ...
404
543
  @overload
405
- def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co: ...
544
+ def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co:
545
+ """
546
+ throw(typ[,val[,tb]]) -> raise exception in coroutine,
547
+ return next iterated value or raise StopIteration.
548
+ """
549
+ ...
406
550
  if sys.version_info >= (3, 13):
407
551
  def __class_getitem__(cls, item: Any, /) -> Any: ...
408
552
 
409
553
  @final
410
554
  class MethodType:
555
+ """
556
+ method(function, instance)
557
+
558
+ Create a bound instance method object.
559
+ """
411
560
  @property
412
561
  def __closure__(self) -> tuple[CellType, ...] | None: ... # inherited from the added function
413
562
  @property
414
563
  def __defaults__(self) -> tuple[Any, ...] | None: ... # inherited from the added function
415
564
  @property
416
- def __func__(self) -> Callable[..., Any]: ...
565
+ def __func__(self) -> Callable[..., Any]:
566
+ """the function (or other callable) implementing a method"""
567
+ ...
417
568
  @property
418
- def __self__(self) -> object: ...
569
+ def __self__(self) -> object:
570
+ """the instance to which a method is bound"""
571
+ ...
419
572
  @property
420
573
  def __name__(self) -> str: ... # inherited from the added function
421
574
  @property
422
575
  def __qualname__(self) -> str: ... # inherited from the added function
423
576
  def __new__(cls, func: Callable[..., Any], obj: object, /) -> Self: ...
424
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
425
- def __eq__(self, value: object, /) -> bool: ...
426
- def __hash__(self) -> int: ...
577
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
578
+ """Call self as a function."""
579
+ ...
580
+ def __eq__(self, value: object, /) -> bool:
581
+ """Return self==value."""
582
+ ...
583
+ def __hash__(self) -> int:
584
+ """Return hash(self)."""
585
+ ...
427
586
 
428
587
  @final
429
588
  class BuiltinFunctionType:
@@ -433,9 +592,15 @@ class BuiltinFunctionType:
433
592
  def __name__(self) -> str: ...
434
593
  @property
435
594
  def __qualname__(self) -> str: ...
436
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
437
- def __eq__(self, value: object, /) -> bool: ...
438
- def __hash__(self) -> int: ...
595
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
596
+ """Call self as a function."""
597
+ ...
598
+ def __eq__(self, value: object, /) -> bool:
599
+ """Return self==value."""
600
+ ...
601
+ def __hash__(self) -> int:
602
+ """Return hash(self)."""
603
+ ...
439
604
 
440
605
  BuiltinMethodType = BuiltinFunctionType
441
606
 
@@ -447,8 +612,12 @@ class WrapperDescriptorType:
447
612
  def __qualname__(self) -> str: ...
448
613
  @property
449
614
  def __objclass__(self) -> type: ...
450
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
451
- def __get__(self, instance: Any, owner: type | None = None, /) -> Any: ...
615
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
616
+ """Call self as a function."""
617
+ ...
618
+ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
619
+ """Return an attribute of instance, which is of type owner."""
620
+ ...
452
621
 
453
622
  @final
454
623
  class MethodWrapperType:
@@ -460,10 +629,18 @@ class MethodWrapperType:
460
629
  def __qualname__(self) -> str: ...
461
630
  @property
462
631
  def __objclass__(self) -> type: ...
463
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
464
- def __eq__(self, value: object, /) -> bool: ...
465
- def __ne__(self, value: object, /) -> bool: ...
466
- def __hash__(self) -> int: ...
632
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
633
+ """Call self as a function."""
634
+ ...
635
+ def __eq__(self, value: object, /) -> bool:
636
+ """Return self==value."""
637
+ ...
638
+ def __ne__(self, value: object, /) -> bool:
639
+ """Return self!=value."""
640
+ ...
641
+ def __hash__(self) -> int:
642
+ """Return hash(self)."""
643
+ ...
467
644
 
468
645
  @final
469
646
  class MethodDescriptorType:
@@ -473,8 +650,12 @@ class MethodDescriptorType:
473
650
  def __qualname__(self) -> str: ...
474
651
  @property
475
652
  def __objclass__(self) -> type: ...
476
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
477
- def __get__(self, instance: Any, owner: type | None = None, /) -> Any: ...
653
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
654
+ """Call self as a function."""
655
+ ...
656
+ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
657
+ """Return an attribute of instance, which is of type owner."""
658
+ ...
478
659
 
479
660
  @final
480
661
  class ClassMethodDescriptorType:
@@ -484,11 +665,21 @@ class ClassMethodDescriptorType:
484
665
  def __qualname__(self) -> str: ...
485
666
  @property
486
667
  def __objclass__(self) -> type: ...
487
- def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
488
- def __get__(self, instance: Any, owner: type | None = None, /) -> Any: ...
668
+ def __call__(self, *args: Any, **kwargs: Any) -> Any:
669
+ """Call self as a function."""
670
+ ...
671
+ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
672
+ """Return an attribute of instance, which is of type owner."""
673
+ ...
489
674
 
490
675
  @final
491
676
  class TracebackType:
677
+ """
678
+ TracebackType(tb_next, tb_frame, tb_lasti, tb_lineno)
679
+ --
680
+
681
+ Create a new traceback object.
682
+ """
492
683
  def __new__(cls, tb_next: TracebackType | None, tb_frame: FrameType, tb_lasti: int, tb_lineno: int) -> Self: ...
493
684
  tb_next: TracebackType | None
494
685
  # the rest are read-only
@@ -521,7 +712,9 @@ class FrameType:
521
712
  f_trace: Callable[[FrameType, str, Any], Any] | None
522
713
  f_trace_lines: bool
523
714
  f_trace_opcodes: bool
524
- def clear(self) -> None: ...
715
+ def clear(self) -> None:
716
+ """F.clear(): clear most references held by the frame"""
717
+ ...
525
718
 
526
719
  @final
527
720
  class GetSetDescriptorType:
@@ -531,9 +724,15 @@ class GetSetDescriptorType:
531
724
  def __qualname__(self) -> str: ...
532
725
  @property
533
726
  def __objclass__(self) -> type: ...
534
- def __get__(self, instance: Any, owner: type | None = None, /) -> Any: ...
535
- def __set__(self, instance: Any, value: Any, /) -> None: ...
536
- def __delete__(self, instance: Any, /) -> None: ...
727
+ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
728
+ """Return an attribute of instance, which is of type owner."""
729
+ ...
730
+ def __set__(self, instance: Any, value: Any, /) -> None:
731
+ """Set an attribute of instance to value."""
732
+ ...
733
+ def __delete__(self, instance: Any, /) -> None:
734
+ """Delete an attribute of instance."""
735
+ ...
537
736
 
538
737
  @final
539
738
  class MemberDescriptorType:
@@ -543,9 +742,15 @@ class MemberDescriptorType:
543
742
  def __qualname__(self) -> str: ...
544
743
  @property
545
744
  def __objclass__(self) -> type: ...
546
- def __get__(self, instance: Any, owner: type | None = None, /) -> Any: ...
547
- def __set__(self, instance: Any, value: Any, /) -> None: ...
548
- def __delete__(self, instance: Any, /) -> None: ...
745
+ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
746
+ """Return an attribute of instance, which is of type owner."""
747
+ ...
748
+ def __set__(self, instance: Any, value: Any, /) -> None:
749
+ """Set an attribute of instance to value."""
750
+ ...
751
+ def __delete__(self, instance: Any, /) -> None:
752
+ """Delete an attribute of instance."""
753
+ ...
549
754
 
550
755
  def new_class(
551
756
  name: str,
@@ -581,19 +786,31 @@ if sys.version_info >= (3, 9):
581
786
  @property
582
787
  def __args__(self) -> tuple[Any, ...]: ...
583
788
  @property
584
- def __parameters__(self) -> tuple[Any, ...]: ...
789
+ def __parameters__(self) -> tuple[Any, ...]:
790
+ """Type variables in the GenericAlias."""
791
+ ...
585
792
  def __new__(cls, origin: type, args: Any) -> Self: ...
586
- def __getitem__(self, typeargs: Any, /) -> GenericAlias: ...
587
- def __eq__(self, value: object, /) -> bool: ...
588
- def __hash__(self) -> int: ...
793
+ def __getitem__(self, typeargs: Any, /) -> GenericAlias:
794
+ """Return self[key]."""
795
+ ...
796
+ def __eq__(self, value: object, /) -> bool:
797
+ """Return self==value."""
798
+ ...
799
+ def __hash__(self) -> int:
800
+ """Return hash(self)."""
801
+ ...
589
802
  if sys.version_info >= (3, 11):
590
803
  @property
591
804
  def __unpacked__(self) -> bool: ...
592
805
  @property
593
806
  def __typing_unpacked_tuple_args__(self) -> tuple[Any, ...] | None: ...
594
807
  if sys.version_info >= (3, 10):
595
- def __or__(self, value: Any, /) -> UnionType: ...
596
- def __ror__(self, value: Any, /) -> UnionType: ...
808
+ def __or__(self, value: Any, /) -> UnionType:
809
+ """Return self|value."""
810
+ ...
811
+ def __ror__(self, value: Any, /) -> UnionType:
812
+ """Return value|self."""
813
+ ...
597
814
 
598
815
  # GenericAlias delegates attr access to `__origin__`
599
816
  def __getattr__(self, name: str) -> Any: ...
@@ -601,7 +818,9 @@ if sys.version_info >= (3, 9):
601
818
  if sys.version_info >= (3, 10):
602
819
  @final
603
820
  class NoneType:
604
- def __bool__(self) -> Literal[False]: ...
821
+ def __bool__(self) -> Literal[False]:
822
+ """True if self else False"""
823
+ ...
605
824
 
606
825
  @final
607
826
  class EllipsisType: ...
@@ -613,10 +832,18 @@ if sys.version_info >= (3, 10):
613
832
  class UnionType:
614
833
  @property
615
834
  def __args__(self) -> tuple[Any, ...]: ...
616
- def __or__(self, value: Any, /) -> UnionType: ...
617
- def __ror__(self, value: Any, /) -> UnionType: ...
618
- def __eq__(self, value: object, /) -> bool: ...
619
- def __hash__(self) -> int: ...
835
+ def __or__(self, value: Any, /) -> UnionType:
836
+ """Return self|value."""
837
+ ...
838
+ def __ror__(self, value: Any, /) -> UnionType:
839
+ """Return value|self."""
840
+ ...
841
+ def __eq__(self, value: object, /) -> bool:
842
+ """Return self==value."""
843
+ ...
844
+ def __hash__(self) -> int:
845
+ """Return hash(self)."""
846
+ ...
620
847
 
621
848
  if sys.version_info >= (3, 13):
622
849
  @final