basedpyright 1.12.2 → 1.12.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 (236) 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/README.md +2 -2
  6. package/dist/typeshed-fallback/commit.txt +1 -1
  7. package/dist/typeshed-fallback/stdlib/VERSIONS +1 -1
  8. package/dist/typeshed-fallback/stdlib/_ast.pyi +661 -22
  9. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +1 -1
  10. package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
  11. package/dist/typeshed-fallback/stdlib/_stat.pyi +27 -13
  12. package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +2 -0
  13. package/dist/typeshed-fallback/stdlib/_typeshed/importlib.pyi +18 -0
  14. package/dist/typeshed-fallback/stdlib/_weakref.pyi +1 -1
  15. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
  17. package/dist/typeshed-fallback/stdlib/ast.pyi +160 -70
  18. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -1
  19. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -1
  20. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -1
  21. package/dist/typeshed-fallback/stdlib/atexit.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/builtins.pyi +30 -8
  23. package/dist/typeshed-fallback/stdlib/calendar.pyi +29 -29
  24. package/dist/typeshed-fallback/stdlib/code.pyi +27 -8
  25. package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +1 -1
  26. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +1 -1
  27. package/dist/typeshed-fallback/stdlib/contextvars.pyi +2 -2
  28. package/dist/typeshed-fallback/stdlib/csv.pyi +4 -4
  29. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +1 -1
  30. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
  31. package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +9 -2
  32. package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +7 -1
  33. package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +5 -2
  34. package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +5 -2
  35. package/dist/typeshed-fallback/stdlib/difflib.pyi +1 -1
  36. package/dist/typeshed-fallback/stdlib/dis.pyi +16 -1
  37. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +22 -7
  38. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +37 -16
  39. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +52 -19
  40. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +4 -4
  41. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +4 -2
  42. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +2 -2
  43. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
  44. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +5 -4
  45. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +4 -2
  46. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +4 -2
  47. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +4 -2
  48. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
  49. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -3
  50. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +20 -10
  51. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +8 -5
  52. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +35 -11
  53. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +11 -3
  54. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
  55. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +4 -2
  56. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +7 -7
  57. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +9 -5
  58. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +1 -1
  59. package/dist/typeshed-fallback/stdlib/filecmp.pyi +1 -1
  60. package/dist/typeshed-fallback/stdlib/fileinput.pyi +1 -1
  61. package/dist/typeshed-fallback/stdlib/functools.pyi +3 -3
  62. package/dist/typeshed-fallback/stdlib/genericpath.pyi +7 -0
  63. package/dist/typeshed-fallback/stdlib/graphlib.pyi +1 -1
  64. package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -3
  65. package/dist/typeshed-fallback/stdlib/http/__init__.pyi +11 -4
  66. package/dist/typeshed-fallback/stdlib/http/cookies.pyi +1 -1
  67. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +2 -2
  68. package/dist/typeshed-fallback/stdlib/importlib/util.pyi +3 -2
  69. package/dist/typeshed-fallback/stdlib/inspect.pyi +6 -0
  70. package/dist/typeshed-fallback/stdlib/keyword.pyi +2 -2
  71. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +69 -42
  72. package/dist/typeshed-fallback/stdlib/mailbox.pyi +2 -2
  73. package/dist/typeshed-fallback/stdlib/marshal.pyi +12 -4
  74. package/dist/typeshed-fallback/stdlib/math.pyi +3 -0
  75. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +1 -1
  76. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +1 -1
  77. package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +1 -1
  78. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
  79. package/dist/typeshed-fallback/stdlib/ntpath.pyi +8 -1
  80. package/dist/typeshed-fallback/stdlib/opcode.pyi +6 -2
  81. package/dist/typeshed-fallback/stdlib/optparse.pyi +1 -1
  82. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -1
  83. package/dist/typeshed-fallback/stdlib/pathlib.pyi +6 -2
  84. package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
  85. package/dist/typeshed-fallback/stdlib/posixpath.pyi +5 -0
  86. package/dist/typeshed-fallback/stdlib/queue.pyi +4 -2
  87. package/dist/typeshed-fallback/stdlib/random.pyi +4 -1
  88. package/dist/typeshed-fallback/stdlib/re.pyi +20 -9
  89. package/dist/typeshed-fallback/stdlib/shelve.pyi +15 -2
  90. package/dist/typeshed-fallback/stdlib/shutil.pyi +38 -8
  91. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  92. package/dist/typeshed-fallback/stdlib/socket.pyi +13 -0
  93. package/dist/typeshed-fallback/stdlib/stat.pyi +6 -0
  94. package/dist/typeshed-fallback/stdlib/statistics.pyi +30 -1
  95. package/dist/typeshed-fallback/stdlib/subprocess.pyi +2 -2
  96. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +15 -19
  97. package/dist/typeshed-fallback/stdlib/syslog.pyi +9 -0
  98. package/dist/typeshed-fallback/stdlib/tempfile.pyi +7 -3
  99. package/dist/typeshed-fallback/stdlib/threading.pyi +3 -0
  100. package/dist/typeshed-fallback/stdlib/token.pyi +5 -4
  101. package/dist/typeshed-fallback/stdlib/tokenize.pyi +10 -3
  102. package/dist/typeshed-fallback/stdlib/types.pyi +20 -18
  103. package/dist/typeshed-fallback/stdlib/typing.pyi +75 -21
  104. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +104 -83
  105. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +1 -1
  106. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +1 -1
  107. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +17 -10
  108. package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +31 -3
  109. package/dist/typeshed-fallback/stdlib/warnings.pyi +13 -1
  110. package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +2 -0
  111. package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +17 -17
  112. package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +29 -29
  113. package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +2 -1
  114. package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +13 -13
  115. package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +8 -3
  116. package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +10 -3
  117. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/ATNType.pyi +2 -2
  118. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/LexerAction.pyi +8 -8
  119. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/PredictionMode.pyi +3 -3
  120. package/dist/typeshed-fallback/stubs/assertpy/METADATA.toml +2 -0
  121. package/dist/typeshed-fallback/stubs/assertpy/assertpy/__init__.pyi +12 -0
  122. package/dist/typeshed-fallback/stubs/assertpy/assertpy/assertpy.pyi +70 -0
  123. package/dist/typeshed-fallback/stubs/assertpy/assertpy/base.pyi +21 -0
  124. package/dist/typeshed-fallback/stubs/assertpy/assertpy/collection.pyi +11 -0
  125. package/dist/typeshed-fallback/stubs/assertpy/assertpy/contains.pyi +16 -0
  126. package/dist/typeshed-fallback/stubs/assertpy/assertpy/date.pyi +11 -0
  127. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dict.pyi +12 -0
  128. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dynamic.pyi +7 -0
  129. package/dist/typeshed-fallback/stubs/assertpy/assertpy/exception.pyi +8 -0
  130. package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -0
  131. package/dist/typeshed-fallback/stubs/assertpy/assertpy/file.pyi +15 -0
  132. package/dist/typeshed-fallback/stubs/assertpy/assertpy/helpers.pyi +3 -0
  133. package/dist/typeshed-fallback/stubs/assertpy/assertpy/numeric.pyi +24 -0
  134. package/dist/typeshed-fallback/stubs/assertpy/assertpy/snapshot.pyi +6 -0
  135. package/dist/typeshed-fallback/stubs/assertpy/assertpy/string.pyi +18 -0
  136. package/dist/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +15 -7
  137. package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +119 -61
  138. package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +3 -3
  139. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +31 -20
  140. package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +16 -8
  141. package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +3 -0
  142. package/dist/typeshed-fallback/stubs/flake8/flake8/__init__.pyi +8 -0
  143. package/dist/typeshed-fallback/stubs/flake8/flake8/_compat.pyi +5 -0
  144. package/dist/typeshed-fallback/stubs/flake8/flake8/api/__init__.pyi +0 -0
  145. package/dist/typeshed-fallback/stubs/flake8/flake8/api/legacy.pyi +27 -0
  146. package/dist/typeshed-fallback/stubs/flake8/flake8/checker.pyi +56 -0
  147. package/dist/typeshed-fallback/stubs/flake8/flake8/defaults.pyi +12 -0
  148. package/dist/typeshed-fallback/stubs/flake8/flake8/discover_files.pyi +8 -0
  149. package/dist/typeshed-fallback/stubs/flake8/flake8/exceptions.pyi +24 -0
  150. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/__init__.pyi +0 -0
  151. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/_windows_color.pyi +1 -0
  152. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/base.pyi +24 -0
  153. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/default.pyi +29 -0
  154. package/dist/typeshed-fallback/stubs/flake8/flake8/main/__init__.pyi +0 -0
  155. package/dist/typeshed-fallback/stubs/flake8/flake8/main/application.pyi +29 -0
  156. package/dist/typeshed-fallback/stubs/flake8/flake8/main/cli.pyi +3 -0
  157. package/dist/typeshed-fallback/stubs/flake8/flake8/main/debug.pyi +5 -0
  158. package/dist/typeshed-fallback/stubs/flake8/flake8/main/options.pyi +12 -0
  159. package/dist/typeshed-fallback/stubs/flake8/flake8/options/__init__.pyi +0 -0
  160. package/dist/typeshed-fallback/stubs/flake8/flake8/options/aggregator.pyi +12 -0
  161. package/dist/typeshed-fallback/stubs/flake8/flake8/options/config.pyi +10 -0
  162. package/dist/typeshed-fallback/stubs/flake8/flake8/options/manager.pyi +71 -0
  163. package/dist/typeshed-fallback/stubs/flake8/flake8/options/parse_args.pyi +6 -0
  164. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/__init__.pyi +0 -0
  165. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/finder.pyi +48 -0
  166. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pycodestyle.pyi +32 -0
  167. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pyflakes.pyi +21 -0
  168. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/reporter.pyi +9 -0
  169. package/dist/typeshed-fallback/stubs/flake8/flake8/processor.pyi +72 -0
  170. package/dist/typeshed-fallback/stubs/flake8/flake8/statistics.pyi +28 -0
  171. package/dist/typeshed-fallback/stubs/flake8/flake8/style_guide.pyi +70 -0
  172. package/dist/typeshed-fallback/stubs/flake8/flake8/utils.pyi +25 -0
  173. package/dist/typeshed-fallback/stubs/flake8/flake8/violation.pyi +13 -0
  174. package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
  175. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/bidi.pyi +5 -3
  176. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +5 -1
  177. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +15 -2
  178. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +2 -1
  179. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +45 -32
  180. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +4 -4
  181. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +1 -1
  182. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/svg.pyi +0 -1
  183. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +2 -1
  184. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +4 -0
  185. package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +1 -1
  186. package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +35 -23
  187. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  188. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/exceptions.pyi +3 -1
  189. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/rest.pyi +8 -2
  190. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -0
  191. package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +1 -1
  192. package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +8 -6
  193. package/dist/typeshed-fallback/stubs/pyaudio/METADATA.toml +2 -2
  194. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/__init__.pyi +0 -0
  195. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/pyflakes.pyi +8 -0
  196. package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
  197. package/dist/typeshed-fallback/stubs/pygit2/pygit2/_pygit2.pyi +1 -15
  198. package/dist/typeshed-fallback/stubs/pygit2/pygit2/enums.pyi +313 -314
  199. package/dist/typeshed-fallback/stubs/pygit2/pygit2/index.pyi +2 -1
  200. package/dist/typeshed-fallback/stubs/pygit2/pygit2/remotes.pyi +7 -1
  201. package/dist/typeshed-fallback/stubs/pygit2/pygit2/repository.pyi +4 -14
  202. package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +7 -1
  203. package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
  204. package/dist/typeshed-fallback/stubs/regex/METADATA.toml +1 -1
  205. package/dist/typeshed-fallback/stubs/regex/regex/_regex_core.pyi +35 -35
  206. package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +10 -10
  207. package/dist/typeshed-fallback/stubs/requests/METADATA.toml +1 -1
  208. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +16 -9
  209. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +4 -2
  210. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_modified.pyi +16 -5
  211. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +25 -10
  212. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +38 -16
  213. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +58 -30
  214. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +2 -1
  215. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +1 -1
  216. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +1 -1
  217. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/upload.pyi +2 -2
  218. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dep_util.pyi +1 -3
  219. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +8 -5
  220. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +14 -6
  221. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +4 -2
  222. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +8 -4
  223. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -3
  224. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -1
  225. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
  226. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install.pyi +3 -1
  227. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +10 -1
  228. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_scripts.pyi +1 -3
  229. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/upload_docs.pyi +2 -3
  230. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
  231. package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
  232. package/dist/typeshed-fallback/stubs/uWSGI/METADATA.toml +4 -1
  233. package/dist/typeshed-fallback/stubs/ujson/METADATA.toml +1 -1
  234. package/dist/typeshed-fallback/stubs/wurlitzer/METADATA.toml +1 -1
  235. package/dist/typeshed-fallback/stubs/wurlitzer/wurlitzer.pyi +48 -6
  236. package/package.json +1 -1
@@ -1,14 +1,17 @@
1
- from _typeshed import Incomplete
1
+ from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
2
2
  from abc import abstractmethod
3
3
  from collections.abc import Callable, Iterable
4
- from typing import ClassVar
5
- from typing_extensions import Self
4
+ from typing import Any, ClassVar, Literal, TypeVar, overload
6
5
 
7
6
  from .dist import Distribution
8
7
 
8
+ _StrPathT = TypeVar("_StrPathT", bound=StrPath)
9
+ _BytesPathT = TypeVar("_BytesPathT", bound=BytesPath)
10
+
9
11
  class Command:
10
12
  distribution: Distribution
11
- sub_commands: ClassVar[list[tuple[str, Callable[[Self], bool] | None]]]
13
+ # Any to work around variance issues
14
+ sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
12
15
  def __init__(self, dist: Distribution) -> None: ...
13
16
  def ensure_finalized(self) -> None: ...
14
17
  @abstractmethod
@@ -25,8 +28,8 @@ class Command:
25
28
  def ensure_dirname(self, option: str) -> None: ...
26
29
  def get_command_name(self) -> str: ...
27
30
  def set_undefined_options(self, src_cmd: str, *option_pairs: tuple[str, str]) -> None: ...
28
- def get_finalized_command(self, command: str, create: int = ...) -> Command: ...
29
- def reinitialize_command(self, command: Command | str, reinit_subcommands: int = ...) -> Command: ...
31
+ def get_finalized_command(self, command: str, create: bool | Literal[0, 1] = 1) -> Command: ...
32
+ def reinitialize_command(self, command: Command | str, reinit_subcommands: bool | Literal[0, 1] = 0) -> Command: ...
30
33
  def run_command(self, command: str) -> None: ...
31
34
  def get_sub_commands(self) -> list[str]: ...
32
35
  def warn(self, msg: str) -> None: ...
@@ -34,42 +37,67 @@ class Command:
34
37
  self, func: Callable[..., object], args: Iterable[Incomplete], msg: str | None = ..., level: int = ...
35
38
  ) -> None: ...
36
39
  def mkpath(self, name: str, mode: int = ...) -> None: ...
40
+ @overload
37
41
  def copy_file(
38
42
  self,
39
- infile: str,
40
- outfile: str,
41
- preserve_mode: int = ...,
42
- preserve_times: int = ...,
43
- link: str | None = ...,
44
- level: int = ...,
45
- ) -> tuple[str, bool]: ... # level is not used
43
+ infile: StrPath,
44
+ outfile: _StrPathT,
45
+ preserve_mode: bool | Literal[0, 1] = 1,
46
+ preserve_times: bool | Literal[0, 1] = 1,
47
+ link: str | None = None,
48
+ level: Unused = 1,
49
+ ) -> tuple[_StrPathT | str, bool]: ...
50
+ @overload
51
+ def copy_file(
52
+ self,
53
+ infile: BytesPath,
54
+ outfile: _BytesPathT,
55
+ preserve_mode: bool | Literal[0, 1] = 1,
56
+ preserve_times: bool | Literal[0, 1] = 1,
57
+ link: str | None = None,
58
+ level: Unused = 1,
59
+ ) -> tuple[_BytesPathT | bytes, bool]: ...
46
60
  def copy_tree(
47
61
  self,
48
- infile: str,
62
+ infile: StrPath,
49
63
  outfile: str,
50
- preserve_mode: int = ...,
51
- preserve_times: int = ...,
52
- preserve_symlinks: int = ...,
53
- level: int = ...,
54
- ) -> list[str]: ... # level is not used
55
- def move_file(self, src: str, dst: str, level: int = ...) -> str: ... # level is not used
56
- def spawn(self, cmd: Iterable[str], search_path: int = ..., level: int = ...) -> None: ... # level is not used
64
+ preserve_mode: bool | Literal[0, 1] = 1,
65
+ preserve_times: bool | Literal[0, 1] = 1,
66
+ preserve_symlinks: bool | Literal[0, 1] = 0,
67
+ level: Unused = 1,
68
+ ) -> list[str]: ...
69
+ @overload
70
+ def move_file(self, src: StrPath, dst: _StrPathT, level: Unused = 1) -> _StrPathT | str: ...
71
+ @overload
72
+ def move_file(self, src: BytesPath, dst: _BytesPathT, level: Unused = 1) -> _BytesPathT | bytes: ...
73
+ def spawn(self, cmd: Iterable[str], search_path: bool | Literal[0, 1] = 1, level: Unused = 1) -> None: ...
74
+ @overload
57
75
  def make_archive(
58
76
  self,
59
77
  base_name: str,
60
78
  format: str,
61
- root_dir: str | None = ...,
62
- base_dir: str | None = ...,
63
- owner: str | None = ...,
64
- group: str | None = ...,
79
+ root_dir: StrOrBytesPath | None = None,
80
+ base_dir: str | None = None,
81
+ owner: str | None = None,
82
+ group: str | None = None,
83
+ ) -> str: ...
84
+ @overload
85
+ def make_archive(
86
+ self,
87
+ base_name: StrPath,
88
+ format: str,
89
+ root_dir: StrOrBytesPath,
90
+ base_dir: str | None = None,
91
+ owner: str | None = None,
92
+ group: str | None = None,
65
93
  ) -> str: ...
66
94
  def make_file(
67
95
  self,
68
96
  infiles: str | list[str] | tuple[str, ...],
69
- outfile: str,
97
+ outfile: StrOrBytesPath,
70
98
  func: Callable[..., object],
71
99
  args: list[Incomplete],
72
- exec_msg: str | None = ...,
73
- skip_msg: str | None = ...,
74
- level: int = ...,
75
- ) -> None: ... # level is not used
100
+ exec_msg: str | None = None,
101
+ skip_msg: str | None = None,
102
+ level: Unused = 1,
103
+ ) -> None: ...
@@ -1,4 +1,5 @@
1
1
  from _typeshed import Incomplete
2
+ from typing import Literal
2
3
 
3
4
  from ..cmd import Command
4
5
 
@@ -31,7 +32,7 @@ class build_py(Command):
31
32
  def find_all_modules(self): ...
32
33
  def get_source_files(self): ...
33
34
  def get_module_outfile(self, build_dir, package, module): ...
34
- def get_outputs(self, include_bytecode: int = ...): ...
35
+ def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ...
35
36
  def build_module(self, module, module_file, package): ...
36
37
  def build_modules(self) -> None: ...
37
38
  def build_packages(self) -> None: ...
@@ -17,7 +17,7 @@ class install_lib(Command):
17
17
  def finalize_options(self) -> None: ...
18
18
  def run(self) -> None: ...
19
19
  def build(self) -> None: ...
20
- def install(self): ...
20
+ def install(self) -> list[str]: ...
21
21
  def byte_compile(self, files) -> None: ...
22
22
  def get_outputs(self): ...
23
23
  def get_inputs(self): ...
@@ -12,7 +12,7 @@ class install_scripts(Command):
12
12
  skip_build: Incomplete
13
13
  def initialize_options(self) -> None: ...
14
14
  def finalize_options(self) -> None: ...
15
- outfiles: Incomplete
15
+ outfiles: list[str]
16
16
  def run(self) -> None: ...
17
17
  def get_inputs(self): ...
18
18
  def get_outputs(self): ...
@@ -1,4 +1,4 @@
1
- from _typeshed import Incomplete
1
+ from _typeshed import Incomplete, StrOrBytesPath
2
2
  from collections.abc import Iterable, Iterator
3
3
  from typing import AnyStr, ClassVar, TypeVar, overload
4
4
 
@@ -18,7 +18,7 @@ class upload(PyPIRCCommand):
18
18
  realm: Incomplete
19
19
  def finalize_options(self) -> None: ...
20
20
  def run(self) -> None: ...
21
- def upload_file(self, command: str, pyversion: str, filename: str) -> None: ...
21
+ def upload_file(self, command: str, pyversion: str, filename: StrOrBytesPath) -> None: ...
22
22
 
23
23
  @overload
24
24
  def make_iterable(values: None) -> list[None]: ...
@@ -1,3 +1 @@
1
- def newer(source: str, target: str) -> bool: ...
2
- def newer_pairwise(sources: list[str], targets: list[str]) -> list[tuple[str, str]]: ...
3
- def newer_group(sources: list[str], target: str, missing: str = ...) -> bool: ...
1
+ from ._modified import newer as newer, newer_group as newer_group, newer_pairwise as newer_pairwise
@@ -1,7 +1,7 @@
1
- from _typeshed import FileDescriptorOrPath, Incomplete, SupportsWrite
1
+ from _typeshed import Incomplete, StrOrBytesPath, StrPath, SupportsWrite
2
2
  from collections.abc import Iterable, Mapping
3
3
  from re import Pattern
4
- from typing import IO, Any, ClassVar, TypeVar, overload
4
+ from typing import IO, Any, ClassVar, Literal, TypeVar, overload
5
5
  from typing_extensions import TypeAlias
6
6
 
7
7
  from .cmd import Command
@@ -12,7 +12,7 @@ _OptionsList: TypeAlias = list[tuple[str, str | None, str, int] | tuple[str, str
12
12
  _CommandT = TypeVar("_CommandT", bound=Command)
13
13
 
14
14
  class DistributionMetadata:
15
- def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
15
+ def __init__(self, path: StrOrBytesPath | None = None) -> None: ...
16
16
  name: str | None
17
17
  version: str | None
18
18
  author: str | None
@@ -31,7 +31,7 @@ class DistributionMetadata:
31
31
  requires: list[str] | None
32
32
  obsoletes: list[str] | None
33
33
  def read_pkg_file(self, file: IO[str]) -> None: ...
34
- def write_pkg_info(self, base_dir: str) -> None: ...
34
+ def write_pkg_info(self, base_dir: StrPath) -> None: ...
35
35
  def write_pkg_file(self, file: SupportsWrite[str]) -> None: ...
36
36
  def get_name(self) -> str: ...
37
37
  def get_version(self) -> str: ...
@@ -64,7 +64,10 @@ class Distribution:
64
64
  def __init__(self, attrs: Mapping[str, Any] | None = None) -> None: ...
65
65
  def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
66
66
  def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
67
- def get_command_obj(self, command: str, create: bool = True) -> Command | None: ...
67
+ @overload
68
+ def get_command_obj(self, command: str, create: Literal[1, True] = 1) -> Command: ...
69
+ @overload
70
+ def get_command_obj(self, command: str, create: Literal[0, False]) -> Command | None: ...
68
71
  global_options: ClassVar[_OptionsList]
69
72
  common_usage: ClassVar[str]
70
73
  display_options: ClassVar[_OptionsList]
@@ -17,21 +17,29 @@ class FileList:
17
17
  def process_template_line(self, line: str) -> None: ...
18
18
  @overload
19
19
  def include_pattern(
20
- self, pattern: str, anchor: bool | Literal[0, 1] = ..., prefix: str | None = ..., is_regex: Literal[0, False] = ...
20
+ self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = ..., is_regex: Literal[0, False] = 0
21
21
  ) -> bool: ...
22
22
  @overload
23
- def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1] = ...) -> bool: ...
23
+ def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
24
24
  @overload
25
25
  def include_pattern(
26
- self, pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = ..., prefix: str | None = ..., is_regex: int = ...
26
+ self,
27
+ pattern: str | Pattern[str],
28
+ anchor: bool | Literal[0, 1] = 1,
29
+ prefix: str | None = ...,
30
+ is_regex: bool | Literal[0, 1] = 0,
27
31
  ) -> bool: ...
28
32
  @overload
29
33
  def exclude_pattern(
30
- self, pattern: str, anchor: bool | Literal[0, 1] = ..., prefix: str | None = ..., is_regex: Literal[0, False] = ...
34
+ self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = ..., is_regex: Literal[0, False] = 0
31
35
  ) -> bool: ...
32
36
  @overload
33
- def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1] = ...) -> bool: ...
37
+ def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
34
38
  @overload
35
39
  def exclude_pattern(
36
- self, pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = ..., prefix: str | None = ..., is_regex: int = ...
40
+ self,
41
+ pattern: str | Pattern[str],
42
+ anchor: bool | Literal[0, 1] = 1,
43
+ prefix: str | None = ...,
44
+ is_regex: bool | Literal[0, 1] = 0,
37
45
  ) -> bool: ...
@@ -17,6 +17,8 @@ def get_config_vars() -> dict[str, str | int]: ...
17
17
  def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
18
18
  def get_config_h_filename() -> str: ...
19
19
  def get_makefile_filename() -> str: ...
20
- def get_python_inc(plat_specific: bool = ..., prefix: str | None = ...) -> str: ...
21
- def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: str | None = ...) -> str: ...
20
+ def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = ...) -> str: ...
21
+ def get_python_lib(
22
+ plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = ...
23
+ ) -> str: ...
22
24
  def customize_compiler(compiler: CCompiler) -> None: ...
@@ -13,17 +13,21 @@ def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ...
13
13
  def grok_environment_error(exc: object, prefix: str = ...) -> str: ...
14
14
  def split_quoted(s: str) -> list[str]: ...
15
15
  def execute(
16
- func: Callable[..., object], args: tuple[Any, ...], msg: str | None = ..., verbose: bool = ..., dry_run: bool = ...
16
+ func: Callable[..., object],
17
+ args: tuple[Any, ...],
18
+ msg: str | None = ...,
19
+ verbose: bool | Literal[0, 1] = 0,
20
+ dry_run: bool | Literal[0, 1] = 0,
17
21
  ) -> None: ...
18
22
  def strtobool(val: str) -> Literal[0, 1]: ...
19
23
  def byte_compile(
20
24
  py_files: list[str],
21
25
  optimize: int = ...,
22
- force: bool = ...,
26
+ force: bool | Literal[0, 1] = 0,
23
27
  prefix: str | None = ...,
24
28
  base_dir: str | None = ...,
25
- verbose: bool = ...,
26
- dry_run: bool = ...,
29
+ verbose: bool | Literal[0, 1] = 1,
30
+ dry_run: bool | Literal[0, 1] = 0,
27
31
  direct: bool | None = ...,
28
32
  ) -> None: ...
29
33
  def rfc822_escape(header: str) -> str: ...
@@ -1,3 +1,4 @@
1
+ from _typeshed import StrPath
1
2
  from collections.abc import Mapping
2
3
  from typing import Any
3
4
 
@@ -33,11 +34,11 @@ class _BuildMetaBackend:
33
34
  self, metadata_directory: str, config_settings: Mapping[str, Any] | None = None
34
35
  ) -> str: ...
35
36
  def build_wheel(
36
- self, wheel_directory: str, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
37
+ self, wheel_directory: StrPath, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
37
38
  ) -> str: ...
38
- def build_sdist(self, sdist_directory: str, config_settings: Mapping[str, Any] | None = None) -> str: ...
39
+ def build_sdist(self, sdist_directory: StrPath, config_settings: Mapping[str, Any] | None = None) -> str: ...
39
40
  def build_editable(
40
- self, wheel_directory: str, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
41
+ self, wheel_directory: StrPath, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
41
42
  ) -> str: ...
42
43
  def get_requires_for_build_editable(self, config_settings: Mapping[str, Any] | None = None) -> list[str]: ...
43
44
  def prepare_metadata_for_build_editable(
@@ -1,5 +1,6 @@
1
1
  from _typeshed import Incomplete
2
2
  from collections.abc import Generator
3
+ from typing import Literal
3
4
 
4
5
  from .. import Command
5
6
 
@@ -46,4 +47,11 @@ def can_scan(): ...
46
47
 
47
48
  INSTALL_DIRECTORY_ATTRS: Incomplete
48
49
 
49
- def make_zipfile(zip_filename, base_dir, verbose: int = 0, dry_run: int = 0, compress: bool = True, mode: str = "w"): ...
50
+ def make_zipfile(
51
+ zip_filename,
52
+ base_dir,
53
+ verbose: bool | Literal[0, 1] = 0,
54
+ dry_run: bool | Literal[0, 1] = 0,
55
+ compress: bool = True,
56
+ mode: str = "w",
57
+ ): ...
@@ -1,5 +1,5 @@
1
1
  from _typeshed import Incomplete
2
- from typing import Any, ClassVar
2
+ from typing import Any, ClassVar, Literal
3
3
 
4
4
  from .._distutils.command.build_ext import build_ext as _build_ext
5
5
 
@@ -40,7 +40,7 @@ def link_shared_object(
40
40
  library_dirs: Incomplete | None = None,
41
41
  runtime_library_dirs: Incomplete | None = None,
42
42
  export_symbols: Incomplete | None = None,
43
- debug: int = 0,
43
+ debug: bool | Literal[0, 1] = 0,
44
44
  extra_preargs: Incomplete | None = None,
45
45
  extra_postargs: Incomplete | None = None,
46
46
  build_temp: Incomplete | None = None,
@@ -1,3 +1,4 @@
1
+ from collections.abc import Callable
1
2
  from typing import Any
2
3
 
3
4
  from .._distutils.command import install as orig
@@ -5,7 +6,8 @@ from .._distutils.command import install as orig
5
6
  class install(orig.install):
6
7
  user_options: Any
7
8
  boolean_options: Any
8
- new_commands: Any
9
+ # Any to work around variance issues
10
+ new_commands: list[tuple[str, Callable[[Any], bool]] | None]
9
11
  old_and_unmanageable: Any
10
12
  single_version_externally_managed: Any
11
13
  def initialize_options(self) -> None: ...
@@ -1,9 +1,18 @@
1
+ from _typeshed import StrPath, Unused
2
+ from typing import Literal
3
+
1
4
  from .._distutils.command import install_lib as orig
2
5
 
3
6
  class install_lib(orig.install_lib):
4
7
  def run(self) -> None: ...
5
8
  def get_exclusions(self): ...
6
9
  def copy_tree(
7
- self, infile, outfile, preserve_mode: int = 1, preserve_times: int = 1, preserve_symlinks: int = 0, level: int = 1
10
+ self,
11
+ infile: StrPath,
12
+ outfile: str,
13
+ preserve_mode: bool | Literal[0, 1] = 1,
14
+ preserve_times: bool | Literal[0, 1] = 1,
15
+ preserve_symlinks: bool | Literal[0, 1] = 0,
16
+ level: Unused = 1,
8
17
  ): ...
9
18
  def get_outputs(self): ...
@@ -1,10 +1,8 @@
1
- from typing import Any
2
-
3
1
  from .._distutils.command import install_scripts as orig
4
2
 
5
3
  class install_scripts(orig.install_scripts):
6
4
  no_ep: bool
7
5
  def initialize_options(self) -> None: ...
8
- outfiles: Any
6
+ outfiles: list[str]
9
7
  def run(self) -> None: ...
10
8
  def write_script(self, script_name, contents, mode: str = "t", *ignored) -> None: ...
@@ -1,6 +1,5 @@
1
1
  from collections.abc import Callable
2
2
  from typing import Any, ClassVar
3
- from typing_extensions import Self
4
3
 
5
4
  from .upload import upload
6
5
 
@@ -10,8 +9,8 @@ class upload_docs(upload):
10
9
  user_options: ClassVar[list[tuple[str, str | None, str]]]
11
10
  boolean_options: ClassVar[list[str]]
12
11
  def has_sphinx(self): ...
13
- # The callable parameter is self: Self, but using Self still trips up mypy
14
- sub_commands: ClassVar[list[tuple[str, Callable[[Self], bool] | None]]] # type: ignore[assignment]
12
+ # Any to work around variance issues
13
+ sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
15
14
  upload_dir: Any
16
15
  target_dir: Any
17
16
  def initialize_options(self) -> None: ...
@@ -16,7 +16,7 @@ class StaticModule:
16
16
  def __getattr__(self, attr): ...
17
17
 
18
18
  def glob_relative(patterns: Iterable[str], root_dir: StrPath | None = None) -> list[str]: ...
19
- def read_files(filepaths: str | bytes | Iterable[StrPath], root_dir: Incomplete | None = None) -> str: ...
19
+ def read_files(filepaths: StrPath | Iterable[StrPath], root_dir: StrPath | None = None) -> str: ...
20
20
  def read_attr(attr_desc: str, package_dir: Mapping[str, str] | None = None, root_dir: StrPath | None = None): ...
21
21
  def resolve_class(
22
22
  qualified_class_name: str, package_dir: Mapping[str, str] | None = None, root_dir: StrPath | None = None
@@ -44,7 +44,7 @@ Iterator = object
44
44
 
45
45
  def get_method_function(meth: types.MethodType) -> types.FunctionType: ...
46
46
  def get_method_self(meth: types.MethodType) -> object: ...
47
- def get_function_closure(fun: types.FunctionType) -> tuple[types._Cell, ...] | None: ...
47
+ def get_function_closure(fun: types.FunctionType) -> tuple[types.CellType, ...] | None: ...
48
48
  def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
49
49
  def get_function_defaults(fun: types.FunctionType) -> tuple[Any, ...] | None: ...
50
50
  def get_function_globals(fun: types.FunctionType) -> dict[str, Any]: ...
@@ -9,4 +9,7 @@ extra_description = """\
9
9
  """
10
10
 
11
11
  [tool.stubtest]
12
- platforms = ["linux"]
12
+ # Run stubtest on MacOS as well, to check that the
13
+ # uWSGI-specific parts of stubtest_third_party.py
14
+ # also work there
15
+ platforms = ["linux", "darwin"]
@@ -1,2 +1,2 @@
1
- version = "5.9.*"
1
+ version = "5.10.*"
2
2
  upstream_repository = "https://github.com/ultrajson/ultrajson"
@@ -1,2 +1,2 @@
1
- version = "3.0.*"
1
+ version = "3.1.*"
2
2
  upstream_repository = "https://github.com/minrk/wurlitzer"
@@ -2,11 +2,12 @@ __all__ = ["STDOUT", "PIPE", "Wurlitzer", "pipes", "sys_pipes", "sys_pipes_forev
2
2
 
3
3
  import contextlib
4
4
  import io
5
+ import logging
5
6
  from _typeshed import SupportsWrite
6
7
  from contextlib import _GeneratorContextManager
7
8
  from types import TracebackType
8
9
  from typing import Any, Final, Literal, Protocol, TextIO, TypeVar, overload
9
- from typing_extensions import TypeAlias
10
+ from typing_extensions import Self, TypeAlias
10
11
 
11
12
  STDOUT: Final = 2
12
13
  PIPE: Final = 3
@@ -31,8 +32,8 @@ class Wurlitzer:
31
32
 
32
33
  def __init__(
33
34
  self,
34
- stdout: SupportsWrite[str] | SupportsWrite[bytes] | None = None,
35
- stderr: _STDOUT | SupportsWrite[str] | SupportsWrite[bytes] | None = None,
35
+ stdout: SupportsWrite[str] | SupportsWrite[bytes] | logging.Logger | None = None,
36
+ stderr: _STDOUT | SupportsWrite[str] | SupportsWrite[bytes] | logging.Logger | None = None,
36
37
  encoding: str | None = ...,
37
38
  bufsize: int | None = ...,
38
39
  ) -> None: ...
@@ -70,6 +71,30 @@ def pipes(
70
71
  stdout: _PIPE, stderr: _StreamErrT, encoding: str = ..., bufsize: int | None = None
71
72
  ) -> _GeneratorContextManager[tuple[io.StringIO, _StreamErrT]]: ...
72
73
  @overload
74
+ def pipes(
75
+ stdout: _PIPE, stderr: logging.Logger, encoding: str = ..., bufsize: int | None = None
76
+ ) -> _GeneratorContextManager[tuple[io.StringIO, _LogPipe]]: ...
77
+ @overload
78
+ def pipes(
79
+ stdout: logging.Logger, stderr: _STDOUT, encoding: str | None = ..., bufsize: int | None = None
80
+ ) -> _GeneratorContextManager[tuple[_LogPipe, None]]: ...
81
+ @overload
82
+ def pipes(
83
+ stdout: logging.Logger, stderr: _PIPE, encoding: None, bufsize: int | None = None
84
+ ) -> _GeneratorContextManager[tuple[_LogPipe, io.BytesIO]]: ...
85
+ @overload
86
+ def pipes(
87
+ stdout: logging.Logger, stderr: _PIPE, encoding: str = ..., bufsize: int | None = None
88
+ ) -> _GeneratorContextManager[tuple[_LogPipe, io.StringIO]]: ...
89
+ @overload
90
+ def pipes(
91
+ stdout: logging.Logger, stderr: _StreamErrT, encoding: str | None = ..., bufsize: int | None = None
92
+ ) -> _GeneratorContextManager[tuple[_LogPipe, _StreamErrT]]: ...
93
+ @overload
94
+ def pipes(
95
+ stdout: logging.Logger, stderr: logging.Logger, encoding: str | None = ..., bufsize: int | None = None
96
+ ) -> _GeneratorContextManager[tuple[_LogPipe, _LogPipe]]: ...
97
+ @overload
73
98
  def pipes(
74
99
  stdout: _StreamOutT, stderr: _STDOUT, encoding: str | None = ..., bufsize: int | None = None
75
100
  ) -> _GeneratorContextManager[tuple[_StreamOutT, None]]: ...
@@ -87,11 +112,28 @@ def pipes(
87
112
  ) -> _GeneratorContextManager[tuple[_StreamOutT, _StreamErrT]]: ...
88
113
  @overload
89
114
  def pipes(
90
- stdout: _PIPE | _StreamOutT = 3,
91
- stderr: _STDOUT | _PIPE | _StreamErrT = 3,
115
+ stdout: _StreamOutT, stderr: logging.Logger, encoding: str | None = ..., bufsize: int | None = None
116
+ ) -> _GeneratorContextManager[tuple[_StreamOutT, _LogPipe]]: ...
117
+ @overload
118
+ def pipes(
119
+ stdout: _PIPE | logging.Logger | _StreamOutT = 3,
120
+ stderr: _STDOUT | _PIPE | logging.Logger | _StreamErrT = 3,
92
121
  encoding: str | None = ...,
93
122
  bufsize: int | None = None,
94
- ) -> _GeneratorContextManager[tuple[io.BytesIO | io.StringIO | _StreamOutT, io.BytesIO | io.StringIO | _StreamErrT | None]]: ...
123
+ ) -> _GeneratorContextManager[
124
+ tuple[io.BytesIO | io.StringIO | _StreamOutT | _LogPipe, io.BytesIO | io.StringIO | _StreamErrT | _LogPipe | None]
125
+ ]: ...
126
+
127
+ class _LogPipe(io.BufferedWriter):
128
+ logger: logging.Logger
129
+ stream_name: str
130
+ level: int
131
+ def __init__(self, logger: logging.Logger, stream_name: str, level: int = 20) -> None: ...
132
+ def write(self, chunk: str) -> None: ... # type: ignore[override]
133
+ def flush(self) -> None: ...
134
+ def __enter__(self) -> Self: ...
135
+ def __exit__(self, *exc_info: object) -> None: ...
136
+
95
137
  def sys_pipes_forever(encoding: str = ..., bufsize: int | None = None) -> None: ...
96
138
  def stop_sys_pipes() -> None: ...
97
139
  def load_ipython_extension(ip: _InteractiveShell) -> None: ...
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "basedpyright",
3
3
  "displayName": "basedpyright",
4
4
  "description": "a pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server",
5
- "version": "1.12.2",
5
+ "version": "1.12.3",
6
6
  "license": "MIT",
7
7
  "author": {
8
8
  "name": "detachhead"