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
@@ -23,11 +23,23 @@ def ip_interface(
23
23
 
24
24
  class _IPAddressBase:
25
25
  @property
26
- def compressed(self) -> str: ...
27
- @property
28
- def exploded(self) -> str: ...
29
- @property
30
- def reverse_pointer(self) -> str: ...
26
+ def compressed(self) -> str:
27
+ """Return the shorthand version of the IP address as a string."""
28
+ ...
29
+ @property
30
+ def exploded(self) -> str:
31
+ """Return the longhand version of the IP address as a string."""
32
+ ...
33
+ @property
34
+ def reverse_pointer(self) -> str:
35
+ """
36
+ The name of the reverse DNS pointer for the IP address, e.g.:
37
+ >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
38
+ '1.0.0.127.in-addr.arpa'
39
+ >>> ipaddress.ip_address("2001:db8::1").reverse_pointer
40
+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa'
41
+ """
42
+ ...
31
43
  @property
32
44
  def version(self) -> int: ...
33
45
 
@@ -95,23 +107,80 @@ class _BaseNetwork(_IPAddressBase, Generic[_A]):
95
107
  def compare_networks(self, other: Self) -> int: ...
96
108
  def hosts(self) -> Iterator[_A]: ...
97
109
  @property
98
- def is_global(self) -> bool: ...
99
- @property
100
- def is_link_local(self) -> bool: ...
101
- @property
102
- def is_loopback(self) -> bool: ...
103
- @property
104
- def is_multicast(self) -> bool: ...
105
- @property
106
- def is_private(self) -> bool: ...
107
- @property
108
- def is_reserved(self) -> bool: ...
109
- @property
110
- def is_unspecified(self) -> bool: ...
110
+ def is_global(self) -> bool:
111
+ """
112
+ Test if this address is allocated for public networks.
113
+
114
+ Returns:
115
+ A boolean, True if the address is not reserved per
116
+ iana-ipv4-special-registry or iana-ipv6-special-registry.
117
+ """
118
+ ...
119
+ @property
120
+ def is_link_local(self) -> bool:
121
+ """
122
+ Test if the address is reserved for link-local.
123
+
124
+ Returns:
125
+ A boolean, True if the address is reserved per RFC 4291.
126
+ """
127
+ ...
128
+ @property
129
+ def is_loopback(self) -> bool:
130
+ """
131
+ Test if the address is a loopback address.
132
+
133
+ Returns:
134
+ A boolean, True if the address is a loopback address as defined in
135
+ RFC 2373 2.5.3.
136
+ """
137
+ ...
138
+ @property
139
+ def is_multicast(self) -> bool:
140
+ """
141
+ Test if the address is reserved for multicast use.
142
+
143
+ Returns:
144
+ A boolean, True if the address is a multicast address.
145
+ See RFC 2373 2.7 for details.
146
+ """
147
+ ...
148
+ @property
149
+ def is_private(self) -> bool:
150
+ """
151
+ Test if this address is allocated for private networks.
152
+
153
+ Returns:
154
+ A boolean, True if the address is reserved per
155
+ iana-ipv4-special-registry or iana-ipv6-special-registry.
156
+ """
157
+ ...
158
+ @property
159
+ def is_reserved(self) -> bool:
160
+ """
161
+ Test if the address is otherwise IETF reserved.
162
+
163
+ Returns:
164
+ A boolean, True if the address is within one of the
165
+ reserved IPv6 Network ranges.
166
+ """
167
+ ...
168
+ @property
169
+ def is_unspecified(self) -> bool:
170
+ """
171
+ Test if the address is unspecified.
172
+
173
+ Returns:
174
+ A boolean, True if this is the unspecified address as defined in
175
+ RFC 2373 2.5.2.
176
+ """
177
+ ...
111
178
  @property
112
179
  def max_prefixlen(self) -> int: ...
113
180
  @property
114
- def num_addresses(self) -> int: ...
181
+ def num_addresses(self) -> int:
182
+ """Number of hosts in the current subnet."""
183
+ ...
115
184
  def overlaps(self, other: _BaseNetwork[IPv4Address] | _BaseNetwork[IPv6Address]) -> bool: ...
116
185
  @property
117
186
  def prefixlen(self) -> int: ...
@@ -166,23 +235,79 @@ class _BaseV6:
166
235
 
167
236
  class IPv6Address(_BaseV6, _BaseAddress):
168
237
  @property
169
- def ipv4_mapped(self) -> IPv4Address | None: ...
170
- @property
171
- def is_site_local(self) -> bool: ...
172
- @property
173
- def sixtofour(self) -> IPv4Address | None: ...
174
- @property
175
- def teredo(self) -> tuple[IPv4Address, IPv4Address] | None: ...
238
+ def ipv4_mapped(self) -> IPv4Address | None:
239
+ """
240
+ Return the IPv4 mapped address.
241
+
242
+ Returns:
243
+ If the IPv6 address is a v4 mapped address, return the
244
+ IPv4 mapped address. Return None otherwise.
245
+ """
246
+ ...
247
+ @property
248
+ def is_site_local(self) -> bool:
249
+ """
250
+ Test if the address is reserved for site-local.
251
+
252
+ Note that the site-local address space has been deprecated by RFC 3879.
253
+ Use is_private to test if this address is in the space of unique local
254
+ addresses as defined by RFC 4193.
255
+
256
+ Returns:
257
+ A boolean, True if the address is reserved per RFC 3513 2.5.6.
258
+ """
259
+ ...
260
+ @property
261
+ def sixtofour(self) -> IPv4Address | None:
262
+ """
263
+ Return the IPv4 6to4 embedded address.
264
+
265
+ Returns:
266
+ The IPv4 6to4-embedded address if present or None if the
267
+ address doesn't appear to contain a 6to4 embedded address.
268
+ """
269
+ ...
270
+ @property
271
+ def teredo(self) -> tuple[IPv4Address, IPv4Address] | None:
272
+ """
273
+ Tuple of embedded teredo IPs.
274
+
275
+ Returns:
276
+ Tuple of the (server, client) IPs or None if the address
277
+ doesn't appear to be a teredo address (doesn't start with
278
+ 2001::/32)
279
+ """
280
+ ...
176
281
  if sys.version_info >= (3, 9):
177
282
  @property
178
- def scope_id(self) -> str | None: ...
283
+ def scope_id(self) -> str | None:
284
+ """
285
+ Identifier of a particular zone of the address's scope.
286
+
287
+ See RFC 4007 for details.
288
+
289
+ Returns:
290
+ A string identifying the zone of the address if specified, else None.
291
+ """
292
+ ...
179
293
 
180
294
  def __hash__(self) -> int: ...
181
295
  def __eq__(self, other: object) -> bool: ...
182
296
 
183
297
  class IPv6Network(_BaseV6, _BaseNetwork[IPv6Address]):
184
298
  @property
185
- def is_site_local(self) -> bool: ...
299
+ def is_site_local(self) -> bool:
300
+ """
301
+ Test if the address is reserved for site-local.
302
+
303
+ Note that the site-local address space has been deprecated by RFC 3879.
304
+ Use is_private to test if this address is in the space of unique local
305
+ addresses as defined by RFC 4193.
306
+
307
+ Returns:
308
+ A boolean, True if the address is reserved per RFC 3513 2.5.6.
309
+ """
310
+ ...
186
311
 
187
312
  class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]):
188
313
  def __eq__(self, other: object) -> bool: ...
@@ -561,7 +561,11 @@ if sys.version_info >= (3, 12):
561
561
  ('D', 'E', 'F')
562
562
  ('G',)
563
563
  """
564
- def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...
564
+ if sys.version_info >= (3, 13):
565
+ def __new__(cls, iterable: Iterable[_T_co], n: int, *, strict: bool = False) -> Self: ...
566
+ else:
567
+ def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...
568
+
565
569
  def __iter__(self) -> Self:
566
570
  """Implement iter(self)."""
567
571
  ...
@@ -10,8 +10,20 @@ INFINITY: float
10
10
 
11
11
  def py_encode_basestring(s: str) -> str: ... # undocumented
12
12
  def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
13
- def encode_basestring(s: str, /) -> str: ... # undocumented
14
- def encode_basestring_ascii(s: str, /) -> str: ... # undocumented
13
+ def encode_basestring(s: str, /) -> str:
14
+ """
15
+ encode_basestring(string) -> string
16
+
17
+ Return a JSON representation of a Python string
18
+ """
19
+ ...
20
+ def encode_basestring_ascii(s: str, /) -> str:
21
+ """
22
+ encode_basestring_ascii(string) -> string
23
+
24
+ Return an ASCII-only JSON representation of a Python string
25
+ """
26
+ ...
15
27
 
16
28
  class JSONEncoder:
17
29
  item_separator: str
@@ -7,14 +7,18 @@ if sys.version_info >= (3, 9):
7
7
  else:
8
8
  __all__ = ["iskeyword", "kwlist"]
9
9
 
10
- def iskeyword(s: str, /) -> bool: ...
10
+ def iskeyword(s: str, /) -> bool:
11
+ """x.__contains__(y) <==> y in x."""
12
+ ...
11
13
 
12
14
  # a list at runtime, but you're not meant to mutate it;
13
15
  # type it as a sequence
14
16
  kwlist: Final[Sequence[str]]
15
17
 
16
18
  if sys.version_info >= (3, 9):
17
- def issoftkeyword(s: str, /) -> bool: ...
19
+ def issoftkeyword(s: str, /) -> bool:
20
+ """x.__contains__(y) <==> y in x."""
21
+ ...
18
22
 
19
23
  # a list at runtime, but you're not meant to mutate it;
20
24
  # type it as a sequence
@@ -37,9 +37,19 @@ class Base:
37
37
  def changed(self) -> None: ...
38
38
  def remove(self) -> int | None: ...
39
39
  @property
40
- def next_sibling(self) -> _NL | None: ...
40
+ def next_sibling(self) -> _NL | None:
41
+ """
42
+ The node immediately following the invocant in their parent's children
43
+ list. If the invocant does not have a next sibling, it is None
44
+ """
45
+ ...
41
46
  @property
42
- def prev_sibling(self) -> _NL | None: ...
47
+ def prev_sibling(self) -> _NL | None:
48
+ """
49
+ The node immediately preceding the invocant in their parent's children
50
+ list. If the invocant does not have a previous sibling, it is None.
51
+ """
52
+ ...
43
53
  def leaves(self) -> Iterator[Leaf]: ...
44
54
  def depth(self) -> int: ...
45
55
  def get_suffix(self) -> str: ...
@@ -361,7 +361,9 @@ class LogRecord:
361
361
  ) -> None: ...
362
362
  def getMessage(self) -> str: ...
363
363
  # Allows setting contextual information on LogRecord objects as per the docs, see #7833
364
- def __setattr__(self, name: str, value: Any, /) -> None: ...
364
+ def __setattr__(self, name: str, value: Any, /) -> None:
365
+ """Implement setattr(self, name, value)."""
366
+ ...
365
367
 
366
368
  _L = TypeVar("_L", bound=Logger | LoggerAdapter[Any])
367
369
 
@@ -494,7 +496,13 @@ class LoggerAdapter(Generic[_L]):
494
496
  @property
495
497
  def name(self) -> str: ... # undocumented
496
498
  if sys.version_info >= (3, 11):
497
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
499
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
500
+ """
501
+ Represent a PEP 585 generic type
502
+
503
+ E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
504
+ """
505
+ ...
498
506
 
499
507
  def getLogger(name: str | None = None) -> Logger: ...
500
508
  def getLoggerClass() -> type[Logger]: ...
@@ -631,7 +639,13 @@ class StreamHandler(Handler, Generic[_StreamT]):
631
639
  def __init__(self: StreamHandler[_StreamT], stream: _StreamT) -> None: ... # pyright: ignore[reportInvalidTypeVarUse] #11780
632
640
  def setStream(self, stream: _StreamT) -> _StreamT | None: ...
633
641
  if sys.version_info >= (3, 11):
634
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
642
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
643
+ """
644
+ Represent a PEP 585 generic type
645
+
646
+ E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
647
+ """
648
+ ...
635
649
 
636
650
  class FileHandler(StreamHandler[TextIOWrapper]):
637
651
  baseFilename: str # undocumented
@@ -82,27 +82,119 @@ PRESET_EXTREME: int # v big number
82
82
  # from _lzma.c
83
83
  @final
84
84
  class LZMADecompressor:
85
+ """
86
+ Create a decompressor object for decompressing data incrementally.
87
+
88
+ format
89
+ Specifies the container format of the input stream. If this is
90
+ FORMAT_AUTO (the default), the decompressor will automatically detect
91
+ whether the input is FORMAT_XZ or FORMAT_ALONE. Streams created with
92
+ FORMAT_RAW cannot be autodetected.
93
+ memlimit
94
+ Limit the amount of memory used by the decompressor. This will cause
95
+ decompression to fail if the input cannot be decompressed within the
96
+ given limit.
97
+ filters
98
+ A custom filter chain. This argument is required for FORMAT_RAW, and
99
+ not accepted with any other format. When provided, this should be a
100
+ sequence of dicts, each indicating the ID and options for a single
101
+ filter.
102
+
103
+ For one-shot decompression, use the decompress() function instead.
104
+ """
85
105
  def __init__(self, format: int | None = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> None: ...
86
- def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes: ...
106
+ def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes:
107
+ """
108
+ Decompress *data*, returning uncompressed data as bytes.
109
+
110
+ If *max_length* is nonnegative, returns at most *max_length* bytes of
111
+ decompressed data. If this limit is reached and further output can be
112
+ produced, *self.needs_input* will be set to ``False``. In this case, the next
113
+ call to *decompress()* may provide *data* as b'' to obtain more of the output.
114
+
115
+ If all of the input data was decompressed and returned (either because this
116
+ was less than *max_length* bytes, or because *max_length* was negative),
117
+ *self.needs_input* will be set to True.
118
+
119
+ Attempting to decompress data after the end of stream is reached raises an
120
+ EOFError. Any data found after the end of the stream is ignored and saved in
121
+ the unused_data attribute.
122
+ """
123
+ ...
87
124
  @property
88
- def check(self) -> int: ...
125
+ def check(self) -> int:
126
+ """ID of the integrity check used by the input stream."""
127
+ ...
89
128
  @property
90
- def eof(self) -> bool: ...
129
+ def eof(self) -> bool:
130
+ """True if the end-of-stream marker has been reached."""
131
+ ...
91
132
  @property
92
- def unused_data(self) -> bytes: ...
133
+ def unused_data(self) -> bytes:
134
+ """Data found after the end of the compressed stream."""
135
+ ...
93
136
  @property
94
- def needs_input(self) -> bool: ...
137
+ def needs_input(self) -> bool:
138
+ """True if more input is needed before more decompressed data can be produced."""
139
+ ...
95
140
 
96
141
  # from _lzma.c
97
142
  @final
98
143
  class LZMACompressor:
144
+ """
145
+ LZMACompressor(format=FORMAT_XZ, check=-1, preset=None, filters=None)
146
+
147
+ Create a compressor object for compressing data incrementally.
148
+
149
+ format specifies the container format to use for the output. This can
150
+ be FORMAT_XZ (default), FORMAT_ALONE, or FORMAT_RAW.
151
+
152
+ check specifies the integrity check to use. For FORMAT_XZ, the default
153
+ is CHECK_CRC64. FORMAT_ALONE and FORMAT_RAW do not support integrity
154
+ checks; for these formats, check must be omitted, or be CHECK_NONE.
155
+
156
+ The settings used by the compressor can be specified either as a
157
+ preset compression level (with the 'preset' argument), or in detail
158
+ as a custom filter chain (with the 'filters' argument). For FORMAT_XZ
159
+ and FORMAT_ALONE, the default is to use the PRESET_DEFAULT preset
160
+ level. For FORMAT_RAW, the caller must always specify a filter chain;
161
+ the raw compressor does not support preset compression levels.
162
+
163
+ preset (if provided) should be an integer in the range 0-9, optionally
164
+ OR-ed with the constant PRESET_EXTREME.
165
+
166
+ filters (if provided) should be a sequence of dicts. Each dict should
167
+ have an entry for "id" indicating the ID of the filter, plus
168
+ additional entries for options to the filter.
169
+
170
+ For one-shot compression, use the compress() function instead.
171
+ """
99
172
  def __init__(
100
173
  self, format: int | None = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
101
174
  ) -> None: ...
102
- def compress(self, data: ReadableBuffer, /) -> bytes: ...
103
- def flush(self) -> bytes: ...
175
+ def compress(self, data: ReadableBuffer, /) -> bytes:
176
+ """
177
+ Provide data to the compressor object.
178
+
179
+ Returns a chunk of compressed data if possible, or b'' otherwise.
104
180
 
105
- class LZMAError(Exception): ...
181
+ When you have finished providing data to the compressor, call the
182
+ flush() method to finish the compression process.
183
+ """
184
+ ...
185
+ def flush(self) -> bytes:
186
+ """
187
+ Finish the compression process.
188
+
189
+ Returns the compressed data left in internal buffers.
190
+
191
+ The compressor object may not be used after this method is called.
192
+ """
193
+ ...
194
+
195
+ class LZMAError(Exception):
196
+ """Call to liblzma failed."""
197
+ ...
106
198
 
107
199
  class LZMAFile(BaseStream, IO[bytes]): # type: ignore[misc] # incompatible definitions of writelines in the base classes
108
200
  def __init__(
@@ -194,4 +286,10 @@ def compress(
194
286
  def decompress(
195
287
  data: ReadableBuffer, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None
196
288
  ) -> bytes: ...
197
- def is_check_supported(check_id: int, /) -> bool: ...
289
+ def is_check_supported(check_id: int, /) -> bool:
290
+ """
291
+ Test whether the given integrity check is supported.
292
+
293
+ Always returns True for CHECK_NONE and CHECK_CRC32.
294
+ """
295
+ ...
@@ -102,7 +102,13 @@ class Mailbox(Generic[_MessageT]):
102
102
  @abstractmethod
103
103
  def close(self) -> None: ...
104
104
  if sys.version_info >= (3, 9):
105
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
105
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
106
+ """
107
+ Represent a PEP 585 generic type
108
+
109
+ E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
110
+ """
111
+ ...
106
112
 
107
113
  class Maildir(Mailbox[MaildirMessage]):
108
114
  colon: str
@@ -244,7 +250,13 @@ class _ProxyFile(Generic[AnyStr]):
244
250
  @property
245
251
  def closed(self) -> bool: ...
246
252
  if sys.version_info >= (3, 9):
247
- def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
253
+ def __class_getitem__(cls, item: Any, /) -> GenericAlias:
254
+ """
255
+ Represent a PEP 585 generic type
256
+
257
+ E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
258
+ """
259
+ ...
248
260
 
249
261
  class _PartialFile(_ProxyFile[AnyStr]):
250
262
  def __init__(self, f: IO[AnyStr], start: int | None = None, stop: int | None = None) -> None: ...