basedpyright 1.24.0 → 1.25.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 (189) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.LICENSE.txt +42 -0
  3. package/dist/pyright-langserver.js.map +1 -1
  4. package/dist/pyright.js +1 -1
  5. package/dist/pyright.js.map +1 -1
  6. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +3 -25
  7. package/dist/typeshed-fallback/stdlib/_bisect.pyi +4 -44
  8. package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
  9. package/dist/typeshed-fallback/stdlib/_csv.pyi +2 -16
  10. package/dist/typeshed-fallback/stdlib/_dbm.pyi +1 -13
  11. package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
  12. package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
  13. package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
  14. package/dist/typeshed-fallback/stdlib/_gdbm.pyi +1 -39
  15. package/dist/typeshed-fallback/stdlib/_hashlib.pyi +7 -28
  16. package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -3
  17. package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
  18. package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +6 -48
  19. package/dist/typeshed-fallback/stdlib/_ssl.pyi +1 -8
  20. package/dist/typeshed-fallback/stdlib/_thread.pyi +1 -8
  21. package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -6
  22. package/dist/typeshed-fallback/stdlib/aifc.pyi +91 -91
  23. package/dist/typeshed-fallback/stdlib/array.pyi +3 -17
  24. package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
  25. package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +4 -23
  26. package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
  27. package/dist/typeshed-fallback/stdlib/audioop.pyi +43 -95
  28. package/dist/typeshed-fallback/stdlib/binascii.pyi +5 -15
  29. package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
  30. package/dist/typeshed-fallback/stdlib/builtins.pyi +8 -106
  31. package/dist/typeshed-fallback/stdlib/cgi.pyi +118 -118
  32. package/dist/typeshed-fallback/stdlib/cgitb.pyi +32 -32
  33. package/dist/typeshed-fallback/stdlib/chunk.pyi +20 -20
  34. package/dist/typeshed-fallback/stdlib/datetime.pyi +4 -12
  35. package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
  36. package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
  37. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
  38. package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
  39. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +176 -176
  40. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
  41. package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
  42. package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
  43. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
  44. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
  45. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
  46. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
  47. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
  48. package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
  49. package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
  50. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
  51. package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
  52. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
  53. package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
  54. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
  55. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
  56. package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
  57. package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
  58. package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
  59. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
  60. package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
  61. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
  62. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
  63. package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
  64. package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
  65. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
  66. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
  67. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
  68. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
  69. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
  70. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +317 -317
  71. package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
  72. package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
  73. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
  74. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
  75. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
  76. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +26 -26
  77. package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
  78. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -10
  79. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
  80. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
  81. package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
  82. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +53 -53
  83. package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
  84. package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
  85. package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -21
  86. package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
  87. package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -30
  88. package/dist/typeshed-fallback/stdlib/imghdr.pyi +17 -17
  89. package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
  90. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +7 -36
  91. package/dist/typeshed-fallback/stdlib/lib2to3/btm_matcher.pyi +28 -28
  92. package/dist/typeshed-fallback/stdlib/lib2to3/fixer_base.pyi +42 -42
  93. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.pyi +8 -8
  94. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -10
  95. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -8
  96. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -8
  97. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.pyi +16 -16
  98. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.pyi +14 -14
  99. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.pyi +8 -8
  100. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -8
  101. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -13
  102. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.pyi +9 -9
  103. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -8
  104. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.pyi +8 -8
  105. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -8
  106. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -8
  107. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -15
  108. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.pyi +16 -16
  109. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.pyi +21 -21
  110. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -8
  111. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.pyi +11 -11
  112. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.pyi +9 -9
  113. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -8
  114. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -9
  115. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -7
  116. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.pyi +7 -7
  117. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.pyi +9 -9
  118. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -17
  119. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -10
  120. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.pyi +8 -8
  121. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.pyi +19 -19
  122. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -8
  123. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -8
  124. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.pyi +12 -12
  125. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.pyi +8 -8
  126. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.pyi +12 -12
  127. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.pyi +8 -8
  128. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -8
  129. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -8
  130. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.pyi +9 -9
  131. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.pyi +17 -17
  132. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.pyi +8 -8
  133. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -7
  134. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -8
  135. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -9
  136. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.pyi +8 -8
  137. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -17
  138. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.pyi +8 -8
  139. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -12
  140. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -15
  141. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -12
  142. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -20
  143. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -8
  144. package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.pyi +9 -9
  145. package/dist/typeshed-fallback/stdlib/lib2to3/main.pyi +42 -42
  146. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.pyi +9 -9
  147. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/driver.pyi +27 -27
  148. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.pyi +24 -24
  149. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/literals.pyi +7 -7
  150. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/parse.pyi +30 -30
  151. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +50 -50
  152. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/token.pyi +69 -69
  153. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.pyi +96 -96
  154. package/dist/typeshed-fallback/stdlib/lib2to3/pygram.pyi +114 -114
  155. package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +117 -127
  156. package/dist/typeshed-fallback/stdlib/lib2to3/refactor.pyi +82 -82
  157. package/dist/typeshed-fallback/stdlib/mailcap.pyi +11 -11
  158. package/dist/typeshed-fallback/stdlib/marshal.pyi +4 -52
  159. package/dist/typeshed-fallback/stdlib/math.pyi +2 -6
  160. package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
  161. package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
  162. package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
  163. package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
  164. package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
  165. package/dist/typeshed-fallback/stdlib/nntplib.pyi +125 -125
  166. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -8
  167. package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
  168. package/dist/typeshed-fallback/stdlib/pipes.pyi +16 -16
  169. package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
  170. package/dist/typeshed-fallback/stdlib/sndhdr.pyi +14 -14
  171. package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
  172. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +2 -6
  173. package/dist/typeshed-fallback/stdlib/ssl.pyi +0 -4
  174. package/dist/typeshed-fallback/stdlib/sunau.pyi +86 -86
  175. package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
  176. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +4 -40
  177. package/dist/typeshed-fallback/stdlib/telnetlib.pyi +123 -123
  178. package/dist/typeshed-fallback/stdlib/tkinter/tix.pyi +299 -299
  179. package/dist/typeshed-fallback/stdlib/types.pyi +2 -6
  180. package/dist/typeshed-fallback/stdlib/typing.pyi +2 -6
  181. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +544 -559
  182. package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +1 -6
  183. package/dist/typeshed-fallback/stdlib/uu.pyi +13 -13
  184. package/dist/typeshed-fallback/stdlib/xdrlib.pyi +57 -57
  185. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
  186. package/dist/typeshed-fallback/stdlib/zipimport.pyi +0 -29
  187. package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -10
  188. package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +3 -9
  189. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- class DistutilsError(Exception): ...
2
- class DistutilsModuleError(DistutilsError): ...
3
- class DistutilsClassError(DistutilsError): ...
4
- class DistutilsGetoptError(DistutilsError): ...
5
- class DistutilsArgError(DistutilsError): ...
6
- class DistutilsFileError(DistutilsError): ...
7
- class DistutilsOptionError(DistutilsError): ...
8
- class DistutilsSetupError(DistutilsError): ...
9
- class DistutilsPlatformError(DistutilsError): ...
10
- class DistutilsExecError(DistutilsError): ...
11
- class DistutilsInternalError(DistutilsError): ...
12
- class DistutilsTemplateError(DistutilsError): ...
13
- class DistutilsByteCompileError(DistutilsError): ...
14
- class CCompilerError(Exception): ...
15
- class PreprocessError(CCompilerError): ...
16
- class CompileError(CCompilerError): ...
17
- class LibError(CCompilerError): ...
18
- class LinkError(CCompilerError): ...
19
- class UnknownFileError(CCompilerError): ...
1
+ class DistutilsError(Exception): ...
2
+ class DistutilsModuleError(DistutilsError): ...
3
+ class DistutilsClassError(DistutilsError): ...
4
+ class DistutilsGetoptError(DistutilsError): ...
5
+ class DistutilsArgError(DistutilsError): ...
6
+ class DistutilsFileError(DistutilsError): ...
7
+ class DistutilsOptionError(DistutilsError): ...
8
+ class DistutilsSetupError(DistutilsError): ...
9
+ class DistutilsPlatformError(DistutilsError): ...
10
+ class DistutilsExecError(DistutilsError): ...
11
+ class DistutilsInternalError(DistutilsError): ...
12
+ class DistutilsTemplateError(DistutilsError): ...
13
+ class DistutilsByteCompileError(DistutilsError): ...
14
+ class CCompilerError(Exception): ...
15
+ class PreprocessError(CCompilerError): ...
16
+ class CompileError(CCompilerError): ...
17
+ class LibError(CCompilerError): ...
18
+ class LinkError(CCompilerError): ...
19
+ class UnknownFileError(CCompilerError): ...
@@ -1,36 +1,36 @@
1
- class Extension:
2
- name: str
3
- sources: list[str]
4
- include_dirs: list[str]
5
- define_macros: list[tuple[str, str | None]]
6
- undef_macros: list[str]
7
- library_dirs: list[str]
8
- libraries: list[str]
9
- runtime_library_dirs: list[str]
10
- extra_objects: list[str]
11
- extra_compile_args: list[str]
12
- extra_link_args: list[str]
13
- export_symbols: list[str]
14
- swig_opts: list[str]
15
- depends: list[str]
16
- language: str | None
17
- optional: bool | None
18
- def __init__(
19
- self,
20
- name: str,
21
- sources: list[str],
22
- include_dirs: list[str] | None = None,
23
- define_macros: list[tuple[str, str | None]] | None = None,
24
- undef_macros: list[str] | None = None,
25
- library_dirs: list[str] | None = None,
26
- libraries: list[str] | None = None,
27
- runtime_library_dirs: list[str] | None = None,
28
- extra_objects: list[str] | None = None,
29
- extra_compile_args: list[str] | None = None,
30
- extra_link_args: list[str] | None = None,
31
- export_symbols: list[str] | None = None,
32
- swig_opts: list[str] | None = None,
33
- depends: list[str] | None = None,
34
- language: str | None = None,
35
- optional: bool | None = None,
36
- ) -> None: ...
1
+ class Extension:
2
+ name: str
3
+ sources: list[str]
4
+ include_dirs: list[str]
5
+ define_macros: list[tuple[str, str | None]]
6
+ undef_macros: list[str]
7
+ library_dirs: list[str]
8
+ libraries: list[str]
9
+ runtime_library_dirs: list[str]
10
+ extra_objects: list[str]
11
+ extra_compile_args: list[str]
12
+ extra_link_args: list[str]
13
+ export_symbols: list[str]
14
+ swig_opts: list[str]
15
+ depends: list[str]
16
+ language: str | None
17
+ optional: bool | None
18
+ def __init__(
19
+ self,
20
+ name: str,
21
+ sources: list[str],
22
+ include_dirs: list[str] | None = None,
23
+ define_macros: list[tuple[str, str | None]] | None = None,
24
+ undef_macros: list[str] | None = None,
25
+ library_dirs: list[str] | None = None,
26
+ libraries: list[str] | None = None,
27
+ runtime_library_dirs: list[str] | None = None,
28
+ extra_objects: list[str] | None = None,
29
+ extra_compile_args: list[str] | None = None,
30
+ extra_link_args: list[str] | None = None,
31
+ export_symbols: list[str] | None = None,
32
+ swig_opts: list[str] | None = None,
33
+ depends: list[str] | None = None,
34
+ language: str | None = None,
35
+ optional: bool | None = None,
36
+ ) -> None: ...
@@ -1,34 +1,34 @@
1
- from collections.abc import Iterable, Mapping
2
- from re import Pattern
3
- from typing import Any, Final, overload
4
- from typing_extensions import TypeAlias
5
-
6
- _Option: TypeAlias = tuple[str, str | None, str]
7
- _GR: TypeAlias = tuple[list[str], OptionDummy]
8
-
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
-
14
- class FancyGetopt:
15
- def __init__(self, option_table: list[_Option] | None = None) -> None: ...
16
- # TODO kinda wrong, `getopt(object=object())` is invalid
17
- @overload
18
- def getopt(self, args: list[str] | None = None) -> _GR: ...
19
- @overload
20
- def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
21
- def get_option_order(self) -> list[tuple[str, str]]: ...
22
- def generate_help(self, header: str | None = None) -> list[str]: ...
23
-
24
- def fancy_getopt(
25
- options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
26
- ) -> list[str] | _GR: ...
27
-
28
- WS_TRANS: Final[dict[int, str]]
29
-
30
- def wrap_text(text: str, width: int) -> list[str]: ...
31
- def translate_longopt(opt: str) -> str: ...
32
-
33
- class OptionDummy:
34
- def __init__(self, options: Iterable[str] = []) -> None: ...
1
+ from collections.abc import Iterable, Mapping
2
+ from re import Pattern
3
+ from typing import Any, Final, overload
4
+ from typing_extensions import TypeAlias
5
+
6
+ _Option: TypeAlias = tuple[str, str | None, str]
7
+ _GR: TypeAlias = tuple[list[str], OptionDummy]
8
+
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
+
14
+ class FancyGetopt:
15
+ def __init__(self, option_table: list[_Option] | None = None) -> None: ...
16
+ # TODO kinda wrong, `getopt(object=object())` is invalid
17
+ @overload
18
+ def getopt(self, args: list[str] | None = None) -> _GR: ...
19
+ @overload
20
+ def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
21
+ def get_option_order(self) -> list[tuple[str, str]]: ...
22
+ def generate_help(self, header: str | None = None) -> list[str]: ...
23
+
24
+ def fancy_getopt(
25
+ options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
26
+ ) -> list[str] | _GR: ...
27
+
28
+ WS_TRANS: Final[dict[int, str]]
29
+
30
+ def wrap_text(text: str, width: int) -> list[str]: ...
31
+ def translate_longopt(opt: str) -> str: ...
32
+
33
+ class OptionDummy:
34
+ def __init__(self, options: Iterable[str] = []) -> None: ...
@@ -1,38 +1,38 @@
1
- from _typeshed import BytesPath, StrOrBytesPath, StrPath
2
- from collections.abc import Iterable
3
- from typing import Literal, TypeVar, overload
4
-
5
- _StrPathT = TypeVar("_StrPathT", bound=StrPath)
6
- _BytesPathT = TypeVar("_BytesPathT", bound=BytesPath)
7
-
8
- @overload
9
- def copy_file(
10
- src: StrPath,
11
- dst: _StrPathT,
12
- preserve_mode: bool | Literal[0, 1] = 1,
13
- preserve_times: bool | Literal[0, 1] = 1,
14
- update: bool | Literal[0, 1] = 0,
15
- link: str | None = None,
16
- verbose: bool | Literal[0, 1] = 1,
17
- dry_run: bool | Literal[0, 1] = 0,
18
- ) -> tuple[_StrPathT | str, bool]: ...
19
- @overload
20
- def copy_file(
21
- src: BytesPath,
22
- dst: _BytesPathT,
23
- preserve_mode: bool | Literal[0, 1] = 1,
24
- preserve_times: bool | Literal[0, 1] = 1,
25
- update: bool | Literal[0, 1] = 0,
26
- link: str | None = None,
27
- verbose: bool | Literal[0, 1] = 1,
28
- dry_run: bool | Literal[0, 1] = 0,
29
- ) -> tuple[_BytesPathT | bytes, bool]: ...
30
- @overload
31
- def move_file(
32
- src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
33
- ) -> _StrPathT | str: ...
34
- @overload
35
- def move_file(
36
- src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
37
- ) -> _BytesPathT | bytes: ...
38
- def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ...
1
+ from _typeshed import BytesPath, StrOrBytesPath, StrPath
2
+ from collections.abc import Iterable
3
+ from typing import Literal, TypeVar, overload
4
+
5
+ _StrPathT = TypeVar("_StrPathT", bound=StrPath)
6
+ _BytesPathT = TypeVar("_BytesPathT", bound=BytesPath)
7
+
8
+ @overload
9
+ def copy_file(
10
+ src: StrPath,
11
+ dst: _StrPathT,
12
+ preserve_mode: bool | Literal[0, 1] = 1,
13
+ preserve_times: bool | Literal[0, 1] = 1,
14
+ update: bool | Literal[0, 1] = 0,
15
+ link: str | None = None,
16
+ verbose: bool | Literal[0, 1] = 1,
17
+ dry_run: bool | Literal[0, 1] = 0,
18
+ ) -> tuple[_StrPathT | str, bool]: ...
19
+ @overload
20
+ def copy_file(
21
+ src: BytesPath,
22
+ dst: _BytesPathT,
23
+ preserve_mode: bool | Literal[0, 1] = 1,
24
+ preserve_times: bool | Literal[0, 1] = 1,
25
+ update: bool | Literal[0, 1] = 0,
26
+ link: str | None = None,
27
+ verbose: bool | Literal[0, 1] = 1,
28
+ dry_run: bool | Literal[0, 1] = 0,
29
+ ) -> tuple[_BytesPathT | bytes, bool]: ...
30
+ @overload
31
+ def move_file(
32
+ src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
33
+ ) -> _StrPathT | str: ...
34
+ @overload
35
+ def move_file(
36
+ src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
37
+ ) -> _BytesPathT | bytes: ...
38
+ def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ...
@@ -1,58 +1,58 @@
1
- from collections.abc import Iterable
2
- from re import Pattern
3
- from typing import Literal, overload
4
-
5
- # class is entirely undocumented
6
- class FileList:
7
- allfiles: Iterable[str] | None
8
- files: list[str]
9
- def __init__(self, warn: None = None, debug_print: None = None) -> None: ...
10
- def set_allfiles(self, allfiles: Iterable[str]) -> None: ...
11
- def findall(self, dir: str = ".") -> None: ...
12
- def debug_print(self, msg: str) -> None: ...
13
- def append(self, item: str) -> None: ...
14
- def extend(self, items: Iterable[str]) -> None: ...
15
- def sort(self) -> None: ...
16
- def remove_duplicates(self) -> None: ...
17
- def process_template_line(self, line: str) -> None: ...
18
- @overload
19
- def include_pattern(
20
- self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0
21
- ) -> bool: ...
22
- @overload
23
- def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
24
- @overload
25
- def include_pattern(
26
- self,
27
- pattern: str | Pattern[str],
28
- anchor: bool | Literal[0, 1] = 1,
29
- prefix: str | None = None,
30
- is_regex: bool | Literal[0, 1] = 0,
31
- ) -> bool: ...
32
- @overload
33
- def exclude_pattern(
34
- self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0
35
- ) -> bool: ...
36
- @overload
37
- def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
38
- @overload
39
- def exclude_pattern(
40
- self,
41
- pattern: str | Pattern[str],
42
- anchor: bool | Literal[0, 1] = 1,
43
- prefix: str | None = None,
44
- is_regex: bool | Literal[0, 1] = 0,
45
- ) -> bool: ...
46
-
47
- def findall(dir: str = ".") -> list[str]: ...
48
- def glob_to_re(pattern: str) -> str: ...
49
- @overload
50
- def translate_pattern(
51
- pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[False, 0] = 0
52
- ) -> Pattern[str]: ...
53
- @overload
54
- def translate_pattern(pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> Pattern[str]: ...
55
- @overload
56
- def translate_pattern(
57
- pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: bool | Literal[0, 1] = 0
58
- ) -> Pattern[str]: ...
1
+ from collections.abc import Iterable
2
+ from re import Pattern
3
+ from typing import Literal, overload
4
+
5
+ # class is entirely undocumented
6
+ class FileList:
7
+ allfiles: Iterable[str] | None
8
+ files: list[str]
9
+ def __init__(self, warn: None = None, debug_print: None = None) -> None: ...
10
+ def set_allfiles(self, allfiles: Iterable[str]) -> None: ...
11
+ def findall(self, dir: str = ".") -> None: ...
12
+ def debug_print(self, msg: str) -> None: ...
13
+ def append(self, item: str) -> None: ...
14
+ def extend(self, items: Iterable[str]) -> None: ...
15
+ def sort(self) -> None: ...
16
+ def remove_duplicates(self) -> None: ...
17
+ def process_template_line(self, line: str) -> None: ...
18
+ @overload
19
+ def include_pattern(
20
+ self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0
21
+ ) -> bool: ...
22
+ @overload
23
+ def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
24
+ @overload
25
+ def include_pattern(
26
+ self,
27
+ pattern: str | Pattern[str],
28
+ anchor: bool | Literal[0, 1] = 1,
29
+ prefix: str | None = None,
30
+ is_regex: bool | Literal[0, 1] = 0,
31
+ ) -> bool: ...
32
+ @overload
33
+ def exclude_pattern(
34
+ self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0
35
+ ) -> bool: ...
36
+ @overload
37
+ def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
38
+ @overload
39
+ def exclude_pattern(
40
+ self,
41
+ pattern: str | Pattern[str],
42
+ anchor: bool | Literal[0, 1] = 1,
43
+ prefix: str | None = None,
44
+ is_regex: bool | Literal[0, 1] = 0,
45
+ ) -> bool: ...
46
+
47
+ def findall(dir: str = ".") -> list[str]: ...
48
+ def glob_to_re(pattern: str) -> str: ...
49
+ @overload
50
+ def translate_pattern(
51
+ pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[False, 0] = 0
52
+ ) -> Pattern[str]: ...
53
+ @overload
54
+ def translate_pattern(pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> Pattern[str]: ...
55
+ @overload
56
+ def translate_pattern(
57
+ pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: bool | Literal[0, 1] = 0
58
+ ) -> Pattern[str]: ...
@@ -1,26 +1,26 @@
1
- from typing import Any, Final
2
-
3
- DEBUG: Final = 1
4
- INFO: Final = 2
5
- WARN: Final = 3
6
- ERROR: Final = 4
7
- FATAL: Final = 5
8
-
9
- class Log:
10
- def __init__(self, threshold: int = 3) -> None: ...
11
- # Arbitrary msg args' type depends on the format method
12
- def log(self, level: int, msg: str, *args: Any) -> None: ...
13
- def debug(self, msg: str, *args: Any) -> None: ...
14
- def info(self, msg: str, *args: Any) -> None: ...
15
- def warn(self, msg: str, *args: Any) -> None: ...
16
- def error(self, msg: str, *args: Any) -> None: ...
17
- def fatal(self, msg: str, *args: Any) -> None: ...
18
-
19
- def log(level: int, msg: str, *args: Any) -> None: ...
20
- def debug(msg: str, *args: Any) -> None: ...
21
- def info(msg: str, *args: Any) -> None: ...
22
- def warn(msg: str, *args: Any) -> None: ...
23
- def error(msg: str, *args: Any) -> None: ...
24
- def fatal(msg: str, *args: Any) -> None: ...
25
- def set_threshold(level: int) -> int: ...
26
- def set_verbosity(v: int) -> None: ...
1
+ from typing import Any, Final
2
+
3
+ DEBUG: Final = 1
4
+ INFO: Final = 2
5
+ WARN: Final = 3
6
+ ERROR: Final = 4
7
+ FATAL: Final = 5
8
+
9
+ class Log:
10
+ def __init__(self, threshold: int = 3) -> None: ...
11
+ # Arbitrary msg args' type depends on the format method
12
+ def log(self, level: int, msg: str, *args: Any) -> None: ...
13
+ def debug(self, msg: str, *args: Any) -> None: ...
14
+ def info(self, msg: str, *args: Any) -> None: ...
15
+ def warn(self, msg: str, *args: Any) -> None: ...
16
+ def error(self, msg: str, *args: Any) -> None: ...
17
+ def fatal(self, msg: str, *args: Any) -> None: ...
18
+
19
+ def log(level: int, msg: str, *args: Any) -> None: ...
20
+ def debug(msg: str, *args: Any) -> None: ...
21
+ def info(msg: str, *args: Any) -> None: ...
22
+ def warn(msg: str, *args: Any) -> None: ...
23
+ def error(msg: str, *args: Any) -> None: ...
24
+ def fatal(msg: str, *args: Any) -> None: ...
25
+ def set_threshold(level: int) -> int: ...
26
+ def set_verbosity(v: int) -> None: ...
@@ -1,3 +1,3 @@
1
- from distutils.ccompiler import CCompiler
2
-
3
- class MSVCCompiler(CCompiler): ...
1
+ from distutils.ccompiler import CCompiler
2
+
3
+ class MSVCCompiler(CCompiler): ...
@@ -1,10 +1,10 @@
1
- from collections.abc import Iterable
2
- from typing import Literal
3
-
4
- def spawn(
5
- cmd: Iterable[str],
6
- search_path: bool | Literal[0, 1] = 1,
7
- verbose: bool | Literal[0, 1] = 0,
8
- dry_run: bool | Literal[0, 1] = 0,
9
- ) -> None: ...
10
- def find_executable(executable: str, path: str | None = None) -> str | None: ...
1
+ from collections.abc import Iterable
2
+ from typing import Literal
3
+
4
+ def spawn(
5
+ cmd: Iterable[str],
6
+ search_path: bool | Literal[0, 1] = 1,
7
+ verbose: bool | Literal[0, 1] = 0,
8
+ dry_run: bool | Literal[0, 1] = 0,
9
+ ) -> None: ...
10
+ def find_executable(executable: str, path: str | None = None) -> str | None: ...
@@ -1,33 +1,33 @@
1
- import sys
2
- from collections.abc import Mapping
3
- from distutils.ccompiler import CCompiler
4
- from typing import Final, Literal, overload
5
- from typing_extensions import deprecated
6
-
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
-
14
- def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
15
- @overload
16
- @deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11")
17
- def get_config_var(name: Literal["SO"]) -> int | str | None: ...
18
- @overload
19
- def get_config_var(name: str) -> int | str | None: ...
20
- @overload
21
- def get_config_vars() -> dict[str, str | int]: ...
22
- @overload
23
- def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
24
- def get_config_h_filename() -> str: ...
25
- def get_makefile_filename() -> str: ...
26
- def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = None) -> str: ...
27
- def get_python_lib(
28
- plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = None
29
- ) -> str: ...
30
- def customize_compiler(compiler: CCompiler) -> None: ...
31
-
32
- if sys.version_info < (3, 10):
33
- def get_python_version() -> str: ...
1
+ import sys
2
+ from collections.abc import Mapping
3
+ from distutils.ccompiler import CCompiler
4
+ from typing import Final, Literal, overload
5
+ from typing_extensions import deprecated
6
+
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
+
14
+ def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
15
+ @overload
16
+ @deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11")
17
+ def get_config_var(name: Literal["SO"]) -> int | str | None: ...
18
+ @overload
19
+ def get_config_var(name: str) -> int | str | None: ...
20
+ @overload
21
+ def get_config_vars() -> dict[str, str | int]: ...
22
+ @overload
23
+ def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
24
+ def get_config_h_filename() -> str: ...
25
+ def get_makefile_filename() -> str: ...
26
+ def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = None) -> str: ...
27
+ def get_python_lib(
28
+ plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = None
29
+ ) -> str: ...
30
+ def customize_compiler(compiler: CCompiler) -> None: ...
31
+
32
+ if sys.version_info < (3, 10):
33
+ def get_python_version() -> str: ...
@@ -1,21 +1,21 @@
1
- from typing import IO, Literal
2
-
3
- class TextFile:
4
- def __init__(
5
- self,
6
- filename: str | None = None,
7
- file: IO[str] | None = None,
8
- *,
9
- strip_comments: bool | Literal[0, 1] = ...,
10
- lstrip_ws: bool | Literal[0, 1] = ...,
11
- rstrip_ws: bool | Literal[0, 1] = ...,
12
- skip_blanks: bool | Literal[0, 1] = ...,
13
- join_lines: bool | Literal[0, 1] = ...,
14
- collapse_join: bool | Literal[0, 1] = ...,
15
- ) -> None: ...
16
- def open(self, filename: str) -> None: ...
17
- def close(self) -> None: ...
18
- def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = None) -> None: ...
19
- def readline(self) -> str | None: ...
20
- def readlines(self) -> list[str]: ...
21
- def unreadline(self, line: str) -> str: ...
1
+ from typing import IO, Literal
2
+
3
+ class TextFile:
4
+ def __init__(
5
+ self,
6
+ filename: str | None = None,
7
+ file: IO[str] | None = None,
8
+ *,
9
+ strip_comments: bool | Literal[0, 1] = ...,
10
+ lstrip_ws: bool | Literal[0, 1] = ...,
11
+ rstrip_ws: bool | Literal[0, 1] = ...,
12
+ skip_blanks: bool | Literal[0, 1] = ...,
13
+ join_lines: bool | Literal[0, 1] = ...,
14
+ collapse_join: bool | Literal[0, 1] = ...,
15
+ ) -> None: ...
16
+ def open(self, filename: str) -> None: ...
17
+ def close(self) -> None: ...
18
+ def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = None) -> None: ...
19
+ def readline(self) -> str | None: ...
20
+ def readlines(self) -> list[str]: ...
21
+ def unreadline(self, line: str) -> str: ...
@@ -1,3 +1,3 @@
1
- from distutils.ccompiler import CCompiler
2
-
3
- class UnixCCompiler(CCompiler): ...
1
+ from distutils.ccompiler import CCompiler
2
+
3
+ class UnixCCompiler(CCompiler): ...