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
@@ -13,11 +13,7 @@ def gen_lib_options(
13
13
  def gen_preprocess_options(macros: list[_Macro], include_dirs: list[str]) -> list[str]: ...
14
14
  def get_default_compiler(osname: str | None = ..., platform: str | None = ...) -> str: ...
15
15
  def new_compiler(
16
- plat: str | None = ...,
17
- compiler: str | None = ...,
18
- verbose: bool | Literal[0, 1] = 0,
19
- dry_run: bool | Literal[0, 1] = 0,
20
- force: bool | Literal[0, 1] = 0,
16
+ plat: str | None = ..., compiler: str | None = ..., verbose: bool = False, dry_run: bool = False, force: bool = False
21
17
  ) -> CCompiler: ...
22
18
  def show_compilers() -> None: ...
23
19
 
@@ -41,9 +37,7 @@ class CCompiler:
41
37
  library_dirs: list[str]
42
38
  runtime_library_dirs: list[str]
43
39
  objects: list[str]
44
- def __init__(
45
- self, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0, force: bool | Literal[0, 1] = 0
46
- ) -> None: ...
40
+ def __init__(self, verbose: bool = False, dry_run: bool = False, force: bool = False) -> None: ...
47
41
  def add_include_dir(self, dir: str) -> None: ...
48
42
  def set_include_dirs(self, dirs: list[str]) -> None: ...
49
43
  def add_library(self, libname: str) -> None: ...
@@ -57,7 +51,7 @@ class CCompiler:
57
51
  def add_link_object(self, object: str) -> None: ...
58
52
  def set_link_objects(self, objects: list[str]) -> None: ...
59
53
  def detect_language(self, sources: str | list[str]) -> str | None: ...
60
- def find_library_file(self, dirs: list[str], lib: str, debug: bool | Literal[0, 1] = 0) -> str | None: ...
54
+ def find_library_file(self, dirs: list[str], lib: str, debug: bool = False) -> str | None: ...
61
55
  def has_function(
62
56
  self,
63
57
  funcname: str,
@@ -76,7 +70,7 @@ class CCompiler:
76
70
  output_dir: str | None = ...,
77
71
  macros: list[_Macro] | None = ...,
78
72
  include_dirs: list[str] | None = ...,
79
- debug: bool | Literal[0, 1] = 0,
73
+ debug: bool = False,
80
74
  extra_preargs: list[str] | None = ...,
81
75
  extra_postargs: list[str] | None = ...,
82
76
  depends: list[str] | None = ...,
@@ -86,7 +80,7 @@ class CCompiler:
86
80
  objects: list[str],
87
81
  output_libname: str,
88
82
  output_dir: str | None = ...,
89
- debug: bool | Literal[0, 1] = 0,
83
+ debug: bool = False,
90
84
  target_lang: str | None = ...,
91
85
  ) -> None: ...
92
86
  def link(
@@ -99,7 +93,7 @@ class CCompiler:
99
93
  library_dirs: list[str] | None = ...,
100
94
  runtime_library_dirs: list[str] | None = ...,
101
95
  export_symbols: list[str] | None = ...,
102
- debug: bool | Literal[0, 1] = 0,
96
+ debug: bool = False,
103
97
  extra_preargs: list[str] | None = ...,
104
98
  extra_postargs: list[str] | None = ...,
105
99
  build_temp: str | None = ...,
@@ -113,7 +107,7 @@ class CCompiler:
113
107
  libraries: list[str] | None = ...,
114
108
  library_dirs: list[str] | None = ...,
115
109
  runtime_library_dirs: list[str] | None = ...,
116
- debug: bool | Literal[0, 1] = 0,
110
+ debug: bool = False,
117
111
  extra_preargs: list[str] | None = ...,
118
112
  extra_postargs: list[str] | None = ...,
119
113
  target_lang: str | None = ...,
@@ -127,7 +121,7 @@ class CCompiler:
127
121
  library_dirs: list[str] | None = ...,
128
122
  runtime_library_dirs: list[str] | None = ...,
129
123
  export_symbols: list[str] | None = ...,
130
- debug: bool | Literal[0, 1] = 0,
124
+ debug: bool = False,
131
125
  extra_preargs: list[str] | None = ...,
132
126
  extra_postargs: list[str] | None = ...,
133
127
  build_temp: str | None = ...,
@@ -142,7 +136,7 @@ class CCompiler:
142
136
  library_dirs: list[str] | None = ...,
143
137
  runtime_library_dirs: list[str] | None = ...,
144
138
  export_symbols: list[str] | None = ...,
145
- debug: bool | Literal[0, 1] = 0,
139
+ debug: bool = False,
146
140
  extra_preargs: list[str] | None = ...,
147
141
  extra_postargs: list[str] | None = ...,
148
142
  build_temp: str | None = ...,
@@ -162,10 +156,10 @@ class CCompiler:
162
156
  @overload
163
157
  def executable_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = ...) -> str: ...
164
158
  def library_filename(
165
- self, libname: str, lib_type: str = "static", strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath = ""
159
+ self, libname: str, lib_type: str = "static", strip_dir: bool = False, output_dir: StrPath = ""
166
160
  ) -> str: ...
167
161
  def object_filenames(
168
- self, source_filenames: Iterable[StrPath], strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath | None = ...
162
+ self, source_filenames: Iterable[StrPath], strip_dir: bool = False, output_dir: StrPath | None = ...
169
163
  ) -> list[str]: ...
170
164
  @overload
171
165
  def shared_object_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = ...) -> str: ...
@@ -1,7 +1,7 @@
1
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 Any, ClassVar, Literal, TypeVar, overload
4
+ from typing import Any, ClassVar, TypeVar, overload
5
5
 
6
6
  from .dist import Distribution
7
7
 
@@ -28,8 +28,8 @@ class Command:
28
28
  def ensure_dirname(self, option: str) -> None: ...
29
29
  def get_command_name(self) -> str: ...
30
30
  def set_undefined_options(self, src_cmd: str, *option_pairs: tuple[str, str]) -> None: ...
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: ...
31
+ def get_finalized_command(self, command: str, create: bool = True) -> Command: ...
32
+ def reinitialize_command(self, command: Command | str, reinit_subcommands: bool = False) -> Command: ...
33
33
  def run_command(self, command: str) -> None: ...
34
34
  def get_sub_commands(self) -> list[str]: ...
35
35
  def warn(self, msg: str) -> None: ...
@@ -42,8 +42,8 @@ class Command:
42
42
  self,
43
43
  infile: StrPath,
44
44
  outfile: _StrPathT,
45
- preserve_mode: bool | Literal[0, 1] = 1,
46
- preserve_times: bool | Literal[0, 1] = 1,
45
+ preserve_mode: bool = True,
46
+ preserve_times: bool = True,
47
47
  link: str | None = None,
48
48
  level: Unused = 1,
49
49
  ) -> tuple[_StrPathT | str, bool]: ...
@@ -52,8 +52,8 @@ class Command:
52
52
  self,
53
53
  infile: BytesPath,
54
54
  outfile: _BytesPathT,
55
- preserve_mode: bool | Literal[0, 1] = 1,
56
- preserve_times: bool | Literal[0, 1] = 1,
55
+ preserve_mode: bool = True,
56
+ preserve_times: bool = True,
57
57
  link: str | None = None,
58
58
  level: Unused = 1,
59
59
  ) -> tuple[_BytesPathT | bytes, bool]: ...
@@ -61,16 +61,16 @@ class Command:
61
61
  self,
62
62
  infile: StrPath,
63
63
  outfile: str,
64
- preserve_mode: bool | Literal[0, 1] = 1,
65
- preserve_times: bool | Literal[0, 1] = 1,
66
- preserve_symlinks: bool | Literal[0, 1] = 0,
64
+ preserve_mode: bool = True,
65
+ preserve_times: bool = True,
66
+ preserve_symlinks: bool = False,
67
67
  level: Unused = 1,
68
68
  ) -> list[str]: ...
69
69
  @overload
70
70
  def move_file(self, src: StrPath, dst: _StrPathT, level: Unused = 1) -> _StrPathT | str: ...
71
71
  @overload
72
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: ...
73
+ def spawn(self, cmd: Iterable[str], search_path: bool = True, level: Unused = 1) -> None: ...
74
74
  @overload
75
75
  def make_archive(
76
76
  self,
@@ -1,5 +1,4 @@
1
1
  from _typeshed import Incomplete
2
- from typing import Literal
3
2
 
4
3
  from ..cmd import Command
5
4
 
@@ -32,7 +31,7 @@ class build_py(Command):
32
31
  def find_all_modules(self): ...
33
32
  def get_source_files(self): ...
34
33
  def get_module_outfile(self, build_dir, package, module): ...
35
- def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ...
34
+ def get_outputs(self, include_bytecode: bool = True): ...
36
35
  def build_module(self, module, module_file, package): ...
37
36
  def build_modules(self) -> None: ...
38
37
  def build_packages(self) -> None: ...
@@ -17,29 +17,21 @@ 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] = 1, prefix: str | None = ..., is_regex: Literal[0, False] = 0
20
+ self, pattern: str, anchor: bool = True, prefix: str | None = ..., is_regex: Literal[0, False] = 0
21
21
  ) -> bool: ...
22
22
  @overload
23
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,
27
- pattern: str | Pattern[str],
28
- anchor: bool | Literal[0, 1] = 1,
29
- prefix: str | None = ...,
30
- is_regex: bool | Literal[0, 1] = 0,
26
+ self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = ..., is_regex: bool = False
31
27
  ) -> bool: ...
32
28
  @overload
33
29
  def exclude_pattern(
34
- self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = ..., is_regex: Literal[0, False] = 0
30
+ self, pattern: str, anchor: bool = True, prefix: str | None = ..., is_regex: Literal[0, False] = 0
35
31
  ) -> bool: ...
36
32
  @overload
37
33
  def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
38
34
  @overload
39
35
  def exclude_pattern(
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,
36
+ self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = ..., is_regex: bool = False
45
37
  ) -> bool: ...
@@ -17,8 +17,6 @@ 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 | 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: ...
20
+ def get_python_inc(plat_specific: bool = False, prefix: str | None = ...) -> str: ...
21
+ def get_python_lib(plat_specific: bool = False, standard_lib: bool = False, prefix: str | None = ...) -> str: ...
24
22
  def customize_compiler(compiler: CCompiler) -> None: ...
@@ -13,21 +13,18 @@ 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],
17
- args: tuple[Any, ...],
18
- msg: str | None = ...,
19
- verbose: bool | Literal[0, 1] = 0,
20
- dry_run: bool | Literal[0, 1] = 0,
16
+ func: Callable[..., object], args: tuple[Any, ...], msg: str | None = ..., verbose: bool = False, dry_run: bool = False
21
17
  ) -> None: ...
22
18
  def strtobool(val: str) -> Literal[0, 1]: ...
23
19
  def byte_compile(
24
20
  py_files: list[str],
25
21
  optimize: int = ...,
26
- force: bool | Literal[0, 1] = 0,
22
+ force: bool = False,
27
23
  prefix: str | None = ...,
28
24
  base_dir: str | None = ...,
29
- verbose: bool | Literal[0, 1] = 1,
30
- dry_run: bool | Literal[0, 1] = 0,
25
+ verbose: bool = True,
26
+ dry_run: bool = False,
31
27
  direct: bool | None = ...,
32
28
  ) -> None: ...
33
29
  def rfc822_escape(header: str) -> str: ...
30
+ def is_mingw() -> bool: ...
@@ -0,0 +1,2 @@
1
+ version = "1.1"
2
+ upstream_repository = "https://github.com/symonsoft/str2bool"
@@ -0,0 +1,7 @@
1
+ from typing import Literal, overload
2
+
3
+ @overload
4
+ def str2bool(value: str, raise_exc: Literal[True]) -> bool: ...
5
+ @overload
6
+ def str2bool(value: str, raise_exc: bool = False) -> bool | None: ...
7
+ def str2bool_exc(value: str) -> bool: ...
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.13.2",
5
+ "version": "1.13.3",
6
6
  "license": "MIT",
7
7
  "author": {
8
8
  "name": "detachhead"