basedpyright 1.16.0 → 1.17.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 (164) 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/_ast.pyi +5 -3
  7. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +6 -3
  8. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +2 -2
  9. package/dist/typeshed-fallback/stdlib/_operator.pyi +5 -1
  10. package/dist/typeshed-fallback/stdlib/_stat.pyi +6 -6
  11. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +2 -2
  12. package/dist/typeshed-fallback/stdlib/argparse.pyi +11 -1
  13. package/dist/typeshed-fallback/stdlib/array.pyi +3 -3
  14. package/dist/typeshed-fallback/stdlib/ast.pyi +18 -17
  15. package/dist/typeshed-fallback/stdlib/builtins.pyi +7 -5
  16. package/dist/typeshed-fallback/stdlib/cmd.pyi +2 -1
  17. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +2 -1
  18. package/dist/typeshed-fallback/stdlib/contextlib.pyi +2 -0
  19. package/dist/typeshed-fallback/stdlib/crypt.pyi +6 -5
  20. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +5 -1
  21. package/dist/typeshed-fallback/stdlib/datetime.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +120 -0
  23. package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -0
  24. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
  25. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +2 -2
  26. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +9 -4
  27. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +2 -2
  28. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
  29. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +5 -5
  30. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -1
  31. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +149 -4
  32. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +6 -6
  33. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +6 -6
  34. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +7 -7
  35. package/dist/typeshed-fallback/stdlib/email/message.pyi +2 -1
  36. package/dist/typeshed-fallback/stdlib/email/utils.pyi +4 -1
  37. package/dist/typeshed-fallback/stdlib/filecmp.pyi +18 -7
  38. package/dist/typeshed-fallback/stdlib/ftplib.pyi +1 -1
  39. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +6 -6
  40. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +31 -36
  41. package/dist/typeshed-fallback/stdlib/marshal.pyi +2 -2
  42. package/dist/typeshed-fallback/stdlib/math.pyi +3 -3
  43. package/dist/typeshed-fallback/stdlib/operator.pyi +3 -0
  44. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +4 -2
  45. package/dist/typeshed-fallback/stdlib/pathlib.pyi +24 -2
  46. package/dist/typeshed-fallback/stdlib/poplib.pyi +2 -1
  47. package/dist/typeshed-fallback/stdlib/pty.pyi +8 -3
  48. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +3 -3
  49. package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +45 -43
  50. package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +12 -10
  51. package/dist/typeshed-fallback/stdlib/select.pyi +1 -1
  52. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  53. package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +8 -2
  54. package/dist/typeshed-fallback/stdlib/tarfile.pyi +1 -1
  55. package/dist/typeshed-fallback/stdlib/time.pyi +5 -5
  56. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +28 -4
  57. package/dist/typeshed-fallback/stdlib/tkinter/constants.pyi +6 -6
  58. package/dist/typeshed-fallback/stdlib/tkinter/dialog.pyi +2 -2
  59. package/dist/typeshed-fallback/stdlib/tkinter/messagebox.pyi +17 -17
  60. package/dist/typeshed-fallback/stdlib/tkinter/ttk.pyi +3 -1
  61. package/dist/typeshed-fallback/stdlib/typing.pyi +2 -1
  62. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +1 -0
  63. package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +78 -3
  64. package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +1 -0
  65. package/dist/typeshed-fallback/stubs/JACK-Client/METADATA.toml +3 -1
  66. package/dist/typeshed-fallback/stubs/cachetools/METADATA.toml +1 -1
  67. package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +2 -2
  68. package/dist/typeshed-fallback/stubs/corus/METADATA.toml +2 -0
  69. package/dist/typeshed-fallback/stubs/corus/corus/__init__.pyi +1 -0
  70. package/dist/typeshed-fallback/stubs/corus/corus/io.pyi +21 -0
  71. package/dist/typeshed-fallback/stubs/corus/corus/readme.pyi +17 -0
  72. package/dist/typeshed-fallback/stubs/corus/corus/record.pyi +8 -0
  73. package/dist/typeshed-fallback/stubs/corus/corus/sources/__init__.pyi +23 -0
  74. package/dist/typeshed-fallback/stubs/corus/corus/sources/bsnlp.pyi +75 -0
  75. package/dist/typeshed-fallback/stubs/corus/corus/sources/buriy.pyi +18 -0
  76. package/dist/typeshed-fallback/stubs/corus/corus/sources/corpora.pyi +50 -0
  77. package/dist/typeshed-fallback/stubs/corus/corus/sources/factru.pyi +74 -0
  78. package/dist/typeshed-fallback/stubs/corus/corus/sources/gareev.pyi +21 -0
  79. package/dist/typeshed-fallback/stubs/corus/corus/sources/gramru.pyi +1 -0
  80. package/dist/typeshed-fallback/stubs/corus/corus/sources/lenta.pyi +19 -0
  81. package/dist/typeshed-fallback/stubs/corus/corus/sources/librusec.pyi +14 -0
  82. package/dist/typeshed-fallback/stubs/corus/corus/sources/meta.pyi +54 -0
  83. package/dist/typeshed-fallback/stubs/corus/corus/sources/mokoron.pyi +28 -0
  84. package/dist/typeshed-fallback/stubs/corus/corus/sources/morphoru.pyi +24 -0
  85. package/dist/typeshed-fallback/stubs/corus/corus/sources/ne5.pyi +28 -0
  86. package/dist/typeshed-fallback/stubs/corus/corus/sources/ods.pyi +46 -0
  87. package/dist/typeshed-fallback/stubs/corus/corus/sources/omnia.pyi +49 -0
  88. package/dist/typeshed-fallback/stubs/corus/corus/sources/persons.pyi +27 -0
  89. package/dist/typeshed-fallback/stubs/corus/corus/sources/ria.pyi +21 -0
  90. package/dist/typeshed-fallback/stubs/corus/corus/sources/rudrec.pyi +27 -0
  91. package/dist/typeshed-fallback/stubs/corus/corus/sources/russe.pyi +16 -0
  92. package/dist/typeshed-fallback/stubs/corus/corus/sources/simlex.pyi +14 -0
  93. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/__init__.pyi +10 -0
  94. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/arzamas.pyi +6 -0
  95. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/common.pyi +77 -0
  96. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/fontanka.pyi +6 -0
  97. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/interfax.pyi +6 -0
  98. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/kp.pyi +6 -0
  99. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/lenta.pyi +6 -0
  100. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/magazines.pyi +6 -0
  101. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/nplus1.pyi +6 -0
  102. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/proza.pyi +8 -0
  103. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/social.pyi +15 -0
  104. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/subtitles.pyi +6 -0
  105. package/dist/typeshed-fallback/stubs/corus/corus/sources/toloka.pyi +28 -0
  106. package/dist/typeshed-fallback/stubs/corus/corus/sources/ud.pyi +29 -0
  107. package/dist/typeshed-fallback/stubs/corus/corus/sources/wiki.pyi +20 -0
  108. package/dist/typeshed-fallback/stubs/corus/corus/sources/wikiner.pyi +19 -0
  109. package/dist/typeshed-fallback/stubs/corus/corus/third/WikiExtractor.pyi +227 -0
  110. package/dist/typeshed-fallback/stubs/corus/corus/third/__init__.pyi +0 -0
  111. package/dist/typeshed-fallback/stubs/corus/corus/zip.pyi +28 -0
  112. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +2 -2
  113. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +1 -1
  114. package/dist/typeshed-fallback/stubs/google-cloud-ndb/google/cloud/ndb/client.pyi +2 -2
  115. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  116. package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/validators.pyi +1 -1
  117. package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +3 -2
  118. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/digraph.pyi +14 -14
  119. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/graph.pyi +15 -9
  120. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +17 -4
  121. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multigraph.pyi +4 -0
  122. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
  123. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/chart/series.pyi +3 -1
  124. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +4 -5
  125. package/dist/typeshed-fallback/stubs/passlib/passlib/utils/handlers.pyi +6 -2
  126. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +1 -1
  127. package/dist/typeshed-fallback/stubs/polib/polib.pyi +4 -2
  128. package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/_psycopg.pyi +1 -1
  129. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/checker.pyi +2 -2
  130. package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +2 -2
  131. package/dist/typeshed-fallback/stubs/pyinstaller/METADATA.toml +1 -5
  132. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +0 -1
  133. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/compat.pyi +2 -0
  134. package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +2 -2
  135. package/dist/typeshed-fallback/stubs/redis/redis/client.pyi +24 -8
  136. package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/doctemplate.pyi +7 -1
  137. package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +3 -1
  138. package/dist/typeshed-fallback/stubs/seaborn/seaborn/_core/plot.pyi +1 -1
  139. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +136 -4
  140. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -0
  141. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +6 -4
  142. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +3 -3
  143. package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +185 -0
  144. package/dist/typeshed-fallback/stubs/setuptools/setuptools/wheel.pyi +1 -1
  145. package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +3 -1
  146. package/package.json +1 -1
  147. package/dist/typeshed-fallback/stubs/flake8-2020/METADATA.toml +0 -2
  148. package/dist/typeshed-fallback/stubs/flake8-2020/flake8_2020.pyi +0 -26
  149. package/dist/typeshed-fallback/stubs/paho-mqtt/METADATA.toml +0 -3
  150. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/__init__.pyi +0 -1
  151. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/client.pyi +0 -331
  152. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/matcher.pyi +0 -11
  153. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/packettypes.pyi +0 -19
  154. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/properties.pyi +0 -38
  155. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/publish.pyi +0 -63
  156. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/reasoncodes.pyi +0 -13
  157. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/subscribe.pyi +0 -39
  158. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/subscribeoptions.pyi +0 -24
  159. package/dist/typeshed-fallback/stubs/python-slugify/METADATA.toml +0 -3
  160. package/dist/typeshed-fallback/stubs/python-slugify/slugify/__init__.pyi +0 -12
  161. package/dist/typeshed-fallback/stubs/python-slugify/slugify/__version__.pyi +0 -8
  162. package/dist/typeshed-fallback/stubs/python-slugify/slugify/slugify.pyi +0 -20
  163. package/dist/typeshed-fallback/stubs/python-slugify/slugify/special.pyi +0 -8
  164. /package/dist/typeshed-fallback/stubs/{paho-mqtt/paho/__init__.pyi → corus/corus/path.pyi} +0 -0
@@ -1,6 +1,26 @@
1
1
  from _typeshed import Incomplete, StrOrBytesPath, StrPath, SupportsWrite
2
2
  from collections.abc import Iterable, MutableMapping
3
3
  from distutils.cmd import Command
4
+ from distutils.command.bdist import bdist
5
+ from distutils.command.bdist_dumb import bdist_dumb
6
+ from distutils.command.bdist_rpm import bdist_rpm
7
+ from distutils.command.build import build
8
+ from distutils.command.build_clib import build_clib
9
+ from distutils.command.build_ext import build_ext
10
+ from distutils.command.build_py import build_py
11
+ from distutils.command.build_scripts import build_scripts
12
+ from distutils.command.check import check
13
+ from distutils.command.clean import clean
14
+ from distutils.command.config import config
15
+ from distutils.command.install import install
16
+ from distutils.command.install_data import install_data
17
+ from distutils.command.install_egg_info import install_egg_info
18
+ from distutils.command.install_headers import install_headers
19
+ from distutils.command.install_lib import install_lib
20
+ from distutils.command.install_scripts import install_scripts
21
+ from distutils.command.register import register
22
+ from distutils.command.sdist import sdist
23
+ from distutils.command.upload import upload
4
24
  from re import Pattern
5
25
  from typing import IO, ClassVar, Literal, TypeVar, overload
6
26
  from typing_extensions import TypeAlias
@@ -63,10 +83,6 @@ class Distribution:
63
83
  def __init__(self, attrs: MutableMapping[str, Incomplete] | None = None) -> None: ...
64
84
  def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
65
85
  def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
66
- @overload
67
- def get_command_obj(self, command: str, create: Literal[1, True] = 1) -> Command: ...
68
- @overload
69
- def get_command_obj(self, command: str, create: Literal[0, False]) -> Command | None: ...
70
86
  global_options: ClassVar[_OptionsList]
71
87
  common_usage: ClassVar[str]
72
88
  display_options: ClassVar[_OptionsList]
@@ -108,8 +124,137 @@ class Distribution:
108
124
  def print_commands(self) -> None: ...
109
125
  def get_command_list(self): ...
110
126
  def get_command_packages(self): ...
127
+ # NOTE: This list comes directly from the distutils/command folder. Minus bdist_msi and bdist_wininst.
128
+ @overload
129
+ def get_command_obj(self, command: Literal["bdist"], create: Literal[1, True] = 1) -> bdist: ...
130
+ @overload
131
+ def get_command_obj(self, command: Literal["bdist_dumb"], create: Literal[1, True] = 1) -> bdist_dumb: ...
132
+ @overload
133
+ def get_command_obj(self, command: Literal["bdist_rpm"], create: Literal[1, True] = 1) -> bdist_rpm: ...
134
+ @overload
135
+ def get_command_obj(self, command: Literal["build"], create: Literal[1, True] = 1) -> build: ...
136
+ @overload
137
+ def get_command_obj(self, command: Literal["build_clib"], create: Literal[1, True] = 1) -> build_clib: ...
138
+ @overload
139
+ def get_command_obj(self, command: Literal["build_ext"], create: Literal[1, True] = 1) -> build_ext: ...
140
+ @overload
141
+ def get_command_obj(self, command: Literal["build_py"], create: Literal[1, True] = 1) -> build_py: ...
142
+ @overload
143
+ def get_command_obj(self, command: Literal["build_scripts"], create: Literal[1, True] = 1) -> build_scripts: ...
144
+ @overload
145
+ def get_command_obj(self, command: Literal["check"], create: Literal[1, True] = 1) -> check: ...
146
+ @overload
147
+ def get_command_obj(self, command: Literal["clean"], create: Literal[1, True] = 1) -> clean: ...
148
+ @overload
149
+ def get_command_obj(self, command: Literal["config"], create: Literal[1, True] = 1) -> config: ...
150
+ @overload
151
+ def get_command_obj(self, command: Literal["install"], create: Literal[1, True] = 1) -> install: ...
152
+ @overload
153
+ def get_command_obj(self, command: Literal["install_data"], create: Literal[1, True] = 1) -> install_data: ...
154
+ @overload
155
+ def get_command_obj(self, command: Literal["install_egg_info"], create: Literal[1, True] = 1) -> install_egg_info: ...
156
+ @overload
157
+ def get_command_obj(self, command: Literal["install_headers"], create: Literal[1, True] = 1) -> install_headers: ...
158
+ @overload
159
+ def get_command_obj(self, command: Literal["install_lib"], create: Literal[1, True] = 1) -> install_lib: ...
160
+ @overload
161
+ def get_command_obj(self, command: Literal["install_scripts"], create: Literal[1, True] = 1) -> install_scripts: ...
162
+ @overload
163
+ def get_command_obj(self, command: Literal["register"], create: Literal[1, True] = 1) -> register: ...
164
+ @overload
165
+ def get_command_obj(self, command: Literal["sdist"], create: Literal[1, True] = 1) -> sdist: ...
166
+ @overload
167
+ def get_command_obj(self, command: Literal["upload"], create: Literal[1, True] = 1) -> upload: ...
168
+ @overload
169
+ def get_command_obj(self, command: str, create: Literal[1, True] = 1) -> Command: ...
170
+ # Not replicating the overloads for "Command | None", user may use "isinstance"
171
+ @overload
172
+ def get_command_obj(self, command: str, create: Literal[0, False]) -> Command | None: ...
173
+ @overload
174
+ def get_command_class(self, command: Literal["bdist"]) -> type[bdist]: ...
175
+ @overload
176
+ def get_command_class(self, command: Literal["bdist_dumb"]) -> type[bdist_dumb]: ...
177
+ @overload
178
+ def get_command_class(self, command: Literal["bdist_rpm"]) -> type[bdist_rpm]: ...
179
+ @overload
180
+ def get_command_class(self, command: Literal["build"]) -> type[build]: ...
181
+ @overload
182
+ def get_command_class(self, command: Literal["build_clib"]) -> type[build_clib]: ...
183
+ @overload
184
+ def get_command_class(self, command: Literal["build_ext"]) -> type[build_ext]: ...
185
+ @overload
186
+ def get_command_class(self, command: Literal["build_py"]) -> type[build_py]: ...
187
+ @overload
188
+ def get_command_class(self, command: Literal["build_scripts"]) -> type[build_scripts]: ...
189
+ @overload
190
+ def get_command_class(self, command: Literal["check"]) -> type[check]: ...
191
+ @overload
192
+ def get_command_class(self, command: Literal["clean"]) -> type[clean]: ...
193
+ @overload
194
+ def get_command_class(self, command: Literal["config"]) -> type[config]: ...
195
+ @overload
196
+ def get_command_class(self, command: Literal["install"]) -> type[install]: ...
197
+ @overload
198
+ def get_command_class(self, command: Literal["install_data"]) -> type[install_data]: ...
199
+ @overload
200
+ def get_command_class(self, command: Literal["install_egg_info"]) -> type[install_egg_info]: ...
201
+ @overload
202
+ def get_command_class(self, command: Literal["install_headers"]) -> type[install_headers]: ...
203
+ @overload
204
+ def get_command_class(self, command: Literal["install_lib"]) -> type[install_lib]: ...
205
+ @overload
206
+ def get_command_class(self, command: Literal["install_scripts"]) -> type[install_scripts]: ...
207
+ @overload
208
+ def get_command_class(self, command: Literal["register"]) -> type[register]: ...
209
+ @overload
210
+ def get_command_class(self, command: Literal["sdist"]) -> type[sdist]: ...
211
+ @overload
212
+ def get_command_class(self, command: Literal["upload"]) -> type[upload]: ...
213
+ @overload
111
214
  def get_command_class(self, command: str) -> type[Command]: ...
112
215
  @overload
216
+ def reinitialize_command(self, command: Literal["bdist"], reinit_subcommands: bool = False) -> bdist: ...
217
+ @overload
218
+ def reinitialize_command(self, command: Literal["bdist_dumb"], reinit_subcommands: bool = False) -> bdist_dumb: ...
219
+ @overload
220
+ def reinitialize_command(self, command: Literal["bdist_rpm"], reinit_subcommands: bool = False) -> bdist_rpm: ...
221
+ @overload
222
+ def reinitialize_command(self, command: Literal["build"], reinit_subcommands: bool = False) -> build: ...
223
+ @overload
224
+ def reinitialize_command(self, command: Literal["build_clib"], reinit_subcommands: bool = False) -> build_clib: ...
225
+ @overload
226
+ def reinitialize_command(self, command: Literal["build_ext"], reinit_subcommands: bool = False) -> build_ext: ...
227
+ @overload
228
+ def reinitialize_command(self, command: Literal["build_py"], reinit_subcommands: bool = False) -> build_py: ...
229
+ @overload
230
+ def reinitialize_command(self, command: Literal["build_scripts"], reinit_subcommands: bool = False) -> build_scripts: ...
231
+ @overload
232
+ def reinitialize_command(self, command: Literal["check"], reinit_subcommands: bool = False) -> check: ...
233
+ @overload
234
+ def reinitialize_command(self, command: Literal["clean"], reinit_subcommands: bool = False) -> clean: ...
235
+ @overload
236
+ def reinitialize_command(self, command: Literal["config"], reinit_subcommands: bool = False) -> config: ...
237
+ @overload
238
+ def reinitialize_command(self, command: Literal["install"], reinit_subcommands: bool = False) -> install: ...
239
+ @overload
240
+ def reinitialize_command(self, command: Literal["install_data"], reinit_subcommands: bool = False) -> install_data: ...
241
+ @overload
242
+ def reinitialize_command(
243
+ self, command: Literal["install_egg_info"], reinit_subcommands: bool = False
244
+ ) -> install_egg_info: ...
245
+ @overload
246
+ def reinitialize_command(self, command: Literal["install_headers"], reinit_subcommands: bool = False) -> install_headers: ...
247
+ @overload
248
+ def reinitialize_command(self, command: Literal["install_lib"], reinit_subcommands: bool = False) -> install_lib: ...
249
+ @overload
250
+ def reinitialize_command(self, command: Literal["install_scripts"], reinit_subcommands: bool = False) -> install_scripts: ...
251
+ @overload
252
+ def reinitialize_command(self, command: Literal["register"], reinit_subcommands: bool = False) -> register: ...
253
+ @overload
254
+ def reinitialize_command(self, command: Literal["sdist"], reinit_subcommands: bool = False) -> sdist: ...
255
+ @overload
256
+ def reinitialize_command(self, command: Literal["upload"], reinit_subcommands: bool = False) -> upload: ...
257
+ @overload
113
258
  def reinitialize_command(self, command: str, reinit_subcommands: bool = False) -> Command: ...
114
259
  @overload
115
260
  def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False) -> _CommandT: ...
@@ -1,15 +1,15 @@
1
1
  from collections.abc import Iterable, Mapping
2
2
  from re import Pattern
3
- from typing import Any, overload
3
+ from typing import Any, Final, overload
4
4
  from typing_extensions import TypeAlias
5
5
 
6
6
  _Option: TypeAlias = tuple[str, str | None, str]
7
7
  _GR: TypeAlias = tuple[list[str], OptionDummy]
8
8
 
9
- longopt_pat: str
10
- longopt_re: Pattern[str]
11
- neg_alias_re: Pattern[str]
12
- longopt_xlate: dict[int, int]
9
+ longopt_pat: Final = r"[a-zA-Z](?:[a-zA-Z0-9-]*)"
10
+ longopt_re: Final[Pattern[str]]
11
+ neg_alias_re: Final[Pattern[str]]
12
+ longopt_xlate: Final[dict[int, int]]
13
13
 
14
14
  class FancyGetopt:
15
15
  def __init__(self, option_table: list[_Option] | None = None) -> None: ...
@@ -25,7 +25,7 @@ def fancy_getopt(
25
25
  options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
26
26
  ) -> list[str] | _GR: ...
27
27
 
28
- WS_TRANS: dict[int, str]
28
+ WS_TRANS: Final[dict[int, str]]
29
29
 
30
30
  def wrap_text(text: str, width: int) -> list[str]: ...
31
31
  def translate_longopt(opt: str) -> str: ...
@@ -1,10 +1,10 @@
1
- from typing import Any
1
+ from typing import Any, Final
2
2
 
3
- DEBUG: int
4
- INFO: int
5
- WARN: int
6
- ERROR: int
7
- FATAL: int
3
+ DEBUG: Final = 1
4
+ INFO: Final = 2
5
+ WARN: Final = 3
6
+ ERROR: Final = 4
7
+ FATAL: Final = 5
8
8
 
9
9
  class Log:
10
10
  def __init__(self, threshold: int = 3) -> None: ...
@@ -1,15 +1,15 @@
1
1
  import sys
2
2
  from collections.abc import Mapping
3
3
  from distutils.ccompiler import CCompiler
4
- from typing import Literal, overload
4
+ from typing import Final, Literal, overload
5
5
  from typing_extensions import deprecated
6
6
 
7
- PREFIX: str
8
- EXEC_PREFIX: str
9
- BASE_PREFIX: str
10
- BASE_EXEC_PREFIX: str
11
- project_base: str
12
- python_build: bool
7
+ PREFIX: Final[str]
8
+ EXEC_PREFIX: Final[str]
9
+ BASE_PREFIX: Final[str]
10
+ BASE_EXEC_PREFIX: Final[str]
11
+ project_base: Final[str]
12
+ python_build: Final[bool]
13
13
 
14
14
  def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
15
15
  @overload
@@ -50,7 +50,8 @@ class Message(Generic[_HeaderT, _HeaderParamT]):
50
50
  def get_payload(self, i: None = None, *, decode: Literal[True]) -> _EncodedPayloadType | Any: ...
51
51
  @overload # not multipart, IDEM but w/o kwarg
52
52
  def get_payload(self, i: None, decode: Literal[True]) -> _EncodedPayloadType | Any: ...
53
- # If `charset=None` and payload supports both `encode` AND `decode`, then an invalid payload could be passed, but this is unlikely
53
+ # If `charset=None` and payload supports both `encode` AND `decode`,
54
+ # then an invalid payload could be passed, but this is unlikely
54
55
  # Not[_SupportsEncodeToPayload]
55
56
  @overload
56
57
  def set_payload(
@@ -66,7 +66,10 @@ def mktime_tz(data: _PDTZ) -> int: ...
66
66
  def formatdate(timeval: float | None = None, localtime: bool = False, usegmt: bool = False) -> str: ...
67
67
  def format_datetime(dt: datetime.datetime, usegmt: bool = False) -> str: ...
68
68
 
69
- if sys.version_info >= (3, 12):
69
+ if sys.version_info >= (3, 14):
70
+ def localtime(dt: datetime.datetime | None = None) -> datetime.datetime: ...
71
+
72
+ elif sys.version_info >= (3, 12):
70
73
  @overload
71
74
  def localtime(dt: datetime.datetime | None = None) -> datetime.datetime: ...
72
75
  @overload
@@ -17,13 +17,24 @@ def cmpfiles(
17
17
  ) -> tuple[list[AnyStr], list[AnyStr], list[AnyStr]]: ...
18
18
 
19
19
  class dircmp(Generic[AnyStr]):
20
- def __init__(
21
- self,
22
- a: GenericPath[AnyStr],
23
- b: GenericPath[AnyStr],
24
- ignore: Sequence[AnyStr] | None = None,
25
- hide: Sequence[AnyStr] | None = None,
26
- ) -> None: ...
20
+ if sys.version_info >= (3, 13):
21
+ def __init__(
22
+ self,
23
+ a: GenericPath[AnyStr],
24
+ b: GenericPath[AnyStr],
25
+ ignore: Sequence[AnyStr] | None = None,
26
+ hide: Sequence[AnyStr] | None = None,
27
+ *,
28
+ shallow: bool = True,
29
+ ) -> None: ...
30
+ else:
31
+ def __init__(
32
+ self,
33
+ a: GenericPath[AnyStr],
34
+ b: GenericPath[AnyStr],
35
+ ignore: Sequence[AnyStr] | None = None,
36
+ hide: Sequence[AnyStr] | None = None,
37
+ ) -> None: ...
27
38
  left: AnyStr
28
39
  right: AnyStr
29
40
  hide: Sequence[AnyStr]
@@ -86,7 +86,7 @@ class FTP:
86
86
  def makeport(self) -> socket: ...
87
87
  def makepasv(self) -> tuple[str, int]: ...
88
88
  def login(self, user: str = "", passwd: str = "", acct: str = "") -> str: ...
89
- # In practice, `rest` rest can actually be anything whose str() is an integer sequence, so to make it simple we allow integers.
89
+ # In practice, `rest` can actually be anything whose str() is an integer sequence, so to make it simple we allow integers
90
90
  def ntransfercmd(self, cmd: str, rest: int | str | None = None) -> tuple[socket, int | None]: ...
91
91
  def transfercmd(self, cmd: str, rest: int | str | None = None) -> socket: ...
92
92
  def retrbinary(
@@ -1,12 +1,12 @@
1
1
  from collections.abc import Callable, Iterator
2
2
  from re import Pattern
3
- from typing import Any
3
+ from typing import Any, Final
4
4
 
5
- ESCAPE: Pattern[str]
6
- ESCAPE_ASCII: Pattern[str]
7
- HAS_UTF8: Pattern[bytes]
8
- ESCAPE_DCT: dict[str, str]
9
- INFINITY: float
5
+ ESCAPE: Final[Pattern[str]]
6
+ ESCAPE_ASCII: Final[Pattern[str]]
7
+ HAS_UTF8: Final[Pattern[bytes]]
8
+ ESCAPE_DCT: Final[dict[str, str]]
9
+ INFINITY: Final[float]
10
10
 
11
11
  def py_encode_basestring(s: str) -> str: ... # undocumented
12
12
  def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
@@ -55,10 +55,9 @@ __all__ = [
55
55
  "setLogRecordFactory",
56
56
  "lastResort",
57
57
  "raiseExceptions",
58
+ "warn",
58
59
  ]
59
60
 
60
- if sys.version_info < (3, 13):
61
- __all__ += ["warn"]
62
61
  if sys.version_info >= (3, 11):
63
62
  __all__ += ["getLevelNamesMapping"]
64
63
  if sys.version_info >= (3, 12):
@@ -157,17 +156,16 @@ class Logger(Filterer):
157
156
  stacklevel: int = 1,
158
157
  extra: Mapping[str, object] | None = None,
159
158
  ) -> None: ...
160
- if sys.version_info < (3, 13):
161
- def warn(
162
- self,
163
- msg: object,
164
- *args: object,
165
- exc_info: _ExcInfoType = None,
166
- stack_info: bool = False,
167
- stacklevel: int = 1,
168
- extra: Mapping[str, object] | None = None,
169
- ) -> None: ...
170
-
159
+ @deprecated("Deprecated; use warning() instead.")
160
+ def warn(
161
+ self,
162
+ msg: object,
163
+ *args: object,
164
+ exc_info: _ExcInfoType = None,
165
+ stack_info: bool = False,
166
+ stacklevel: int = 1,
167
+ extra: Mapping[str, object] | None = None,
168
+ ) -> None: ...
171
169
  def error(
172
170
  self,
173
171
  msg: object,
@@ -414,18 +412,17 @@ class LoggerAdapter(Generic[_L]):
414
412
  extra: Mapping[str, object] | None = None,
415
413
  **kwargs: object,
416
414
  ) -> None: ...
417
- if sys.version_info < (3, 13):
418
- def warn(
419
- self,
420
- msg: object,
421
- *args: object,
422
- exc_info: _ExcInfoType = None,
423
- stack_info: bool = False,
424
- stacklevel: int = 1,
425
- extra: Mapping[str, object] | None = None,
426
- **kwargs: object,
427
- ) -> None: ...
428
-
415
+ @deprecated("Deprecated; use warning() instead.")
416
+ def warn(
417
+ self,
418
+ msg: object,
419
+ *args: object,
420
+ exc_info: _ExcInfoType = None,
421
+ stack_info: bool = False,
422
+ stacklevel: int = 1,
423
+ extra: Mapping[str, object] | None = None,
424
+ **kwargs: object,
425
+ ) -> None: ...
429
426
  def error(
430
427
  self,
431
428
  msg: object,
@@ -531,17 +528,15 @@ def warning(
531
528
  stacklevel: int = 1,
532
529
  extra: Mapping[str, object] | None = None,
533
530
  ) -> None: ...
534
-
535
- if sys.version_info < (3, 13):
536
- def warn(
537
- msg: object,
538
- *args: object,
539
- exc_info: _ExcInfoType = None,
540
- stack_info: bool = False,
541
- stacklevel: int = 1,
542
- extra: Mapping[str, object] | None = None,
543
- ) -> None: ...
544
-
531
+ @deprecated("Deprecated; use warning() instead.")
532
+ def warn(
533
+ msg: object,
534
+ *args: object,
535
+ exc_info: _ExcInfoType = None,
536
+ stack_info: bool = False,
537
+ stacklevel: int = 1,
538
+ extra: Mapping[str, object] | None = None,
539
+ ) -> None: ...
545
540
  def error(
546
541
  msg: object,
547
542
  *args: object,
@@ -6,7 +6,7 @@ machine architecture issues.
6
6
  Not all Python object types are supported; in general, only objects
7
7
  whose value is independent from a particular invocation of Python can be
8
8
  written and read by this module. The following types are supported:
9
- None, integers, floating point numbers, strings, bytes, bytearrays,
9
+ None, integers, floating-point numbers, strings, bytes, bytearrays,
10
10
  tuples, lists, sets, dictionaries, and code objects, where it
11
11
  should be understood that tuples, lists and dictionaries are only
12
12
  supported as long as the values contained therein are themselves
@@ -17,7 +17,7 @@ Variables:
17
17
 
18
18
  version -- indicates the format that the module uses. Version 0 is the
19
19
  historical format, version 1 shares interned strings and version 2
20
- uses a binary format for floating point numbers.
20
+ uses a binary format for floating-point numbers.
21
21
  Version 3 shares common object references (New in version 3.4).
22
22
 
23
23
  Functions:
@@ -193,9 +193,9 @@ def frexp(x: _SupportsFloatOrIndex, /) -> tuple[float, int]:
193
193
  ...
194
194
  def fsum(seq: Iterable[_SupportsFloatOrIndex], /) -> float:
195
195
  """
196
- Return an accurate floating point sum of values in the iterable seq.
196
+ Return an accurate floating-point sum of values in the iterable seq.
197
197
 
198
- Assumes IEEE-754 floating point arithmetic.
198
+ Assumes IEEE-754 floating-point arithmetic.
199
199
  """
200
200
  ...
201
201
  def gamma(x: _SupportsFloatOrIndex, /) -> float:
@@ -238,7 +238,7 @@ def isclose(
238
238
  abs_tol: _SupportsFloatOrIndex = 0.0,
239
239
  ) -> bool:
240
240
  """
241
- Determine whether two floating point numbers are close in value.
241
+ Determine whether two floating-point numbers are close in value.
242
242
 
243
243
  rel_tol
244
244
  maximum difference for being considered "close", relative to the
@@ -61,6 +61,9 @@ __all__ = [
61
61
  if sys.version_info >= (3, 11):
62
62
  __all__ += ["call"]
63
63
 
64
+ if sys.version_info >= (3, 14):
65
+ __all__ += ["is_none", "is_not_none"]
66
+
64
67
  __lt__ = lt
65
68
  __le__ = le
66
69
  __eq__ = eq
@@ -383,7 +383,9 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
383
383
  if sys.version_info >= (3, 12) and sys.platform == "win32":
384
384
  @property
385
385
  @deprecated(
386
- "Use st_birthtime instead to retrieve the file creation time. In the future, this property will contain the last metadata change time."
386
+ """\
387
+ Use st_birthtime instead to retrieve the file creation time. \
388
+ In the future, this property will contain the last metadata change time."""
387
389
  )
388
390
  def st_ctime(self) -> float: ...
389
391
  else:
@@ -1950,7 +1952,7 @@ def times() -> times_result:
1950
1952
 
1951
1953
  The object returned behaves like a named tuple with these fields:
1952
1954
  (utime, stime, cutime, cstime, elapsed_time)
1953
- All fields are floating point numbers.
1955
+ All fields are floating-point numbers.
1954
1956
  """
1955
1957
  ...
1956
1958
  def waitpid(pid: int, options: int, /) -> tuple[int, int]:
@@ -190,6 +190,20 @@ class Path(PurePath):
190
190
  def lchmod(self, mode: int) -> None: ...
191
191
  def lstat(self) -> stat_result: ...
192
192
  def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ...
193
+
194
+ if sys.version_info >= (3, 14):
195
+ def copy(self, target: StrPath, *, follow_symlinks: bool = True, preserve_metadata: bool = False) -> None: ...
196
+ def copytree(
197
+ self,
198
+ target: StrPath,
199
+ *,
200
+ follow_symlinks: bool = True,
201
+ preserve_metadata: bool = False,
202
+ dirs_exist_ok: bool = False,
203
+ ignore: Callable[[Self], bool] | None = None,
204
+ on_error: Callable[[OSError], object] | None = None,
205
+ ) -> None: ...
206
+
193
207
  # Adapted from builtins.open
194
208
  # Text mode: always returns a TextIOWrapper
195
209
  # The Traversable .open in stdlib/importlib/abc.pyi should be kept in sync with this.
@@ -263,10 +277,18 @@ class Path(PurePath):
263
277
  if sys.version_info >= (3, 9):
264
278
  def readlink(self) -> Self: ...
265
279
 
266
- def rename(self, target: str | PurePath) -> Self: ...
267
- def replace(self, target: str | PurePath) -> Self: ...
280
+ if sys.version_info >= (3, 10):
281
+ def rename(self, target: StrPath) -> Self: ...
282
+ def replace(self, target: StrPath) -> Self: ...
283
+ else:
284
+ def rename(self, target: str | PurePath) -> Self: ...
285
+ def replace(self, target: str | PurePath) -> Self: ...
286
+
268
287
  def resolve(self, strict: bool = False) -> Self: ...
269
288
  def rmdir(self) -> None: ...
289
+ if sys.version_info >= (3, 14):
290
+ def delete(self, ignore_errors: bool = False, on_error: Callable[[OSError], object] | None = None) -> None: ...
291
+
270
292
  def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None: ...
271
293
  if sys.version_info >= (3, 10):
272
294
  def hardlink_to(self, target: StrOrBytesPath) -> None: ...
@@ -67,5 +67,6 @@ class POP3_SSL(POP3):
67
67
  timeout: float = ...,
68
68
  context: ssl.SSLContext | None = None,
69
69
  ) -> None: ...
70
- # "context" is actually the last argument, but that breaks LSP and it doesn't really matter because all the arguments are ignored
70
+ # "context" is actually the last argument,
71
+ # but that breaks LSP and it doesn't really matter because all the arguments are ignored
71
72
  def stls(self, context: Any = None, keyfile: Any = None, certfile: Any = None) -> NoReturn: ...
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
  from collections.abc import Callable, Iterable
3
3
  from typing import Final
4
- from typing_extensions import TypeAlias
4
+ from typing_extensions import TypeAlias, deprecated
5
5
 
6
6
  if sys.platform != "win32":
7
7
  __all__ = ["openpty", "fork", "spawn"]
@@ -13,7 +13,12 @@ if sys.platform != "win32":
13
13
 
14
14
  CHILD: Final = 0
15
15
  def openpty() -> tuple[int, int]: ...
16
- def master_open() -> tuple[int, str]: ... # deprecated, use openpty()
17
- def slave_open(tty_name: str) -> int: ... # deprecated, use openpty()
16
+
17
+ if sys.version_info < (3, 14):
18
+ @deprecated("Deprecated in 3.12, to be removed in 3.14; use openpty() instead")
19
+ def master_open() -> tuple[int, str]: ...
20
+ @deprecated("Deprecated in 3.12, to be removed in 3.14; use openpty() instead")
21
+ def slave_open(tty_name: str) -> int: ...
22
+
18
23
  def fork() -> tuple[int, int]: ...
19
24
  def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ...
@@ -17,9 +17,9 @@ class ExpatError(Exception):
17
17
  offset: int
18
18
 
19
19
  error = ExpatError
20
- XML_PARAM_ENTITY_PARSING_NEVER: int
21
- XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: int
22
- XML_PARAM_ENTITY_PARSING_ALWAYS: int
20
+ XML_PARAM_ENTITY_PARSING_NEVER: Final = 0
21
+ XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: Final = 1
22
+ XML_PARAM_ENTITY_PARSING_ALWAYS: Final = 2
23
23
 
24
24
  _Model: TypeAlias = tuple[int, int, str | None, tuple[Any, ...]]
25
25