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,82 +1,82 @@
1
- from _typeshed import FileDescriptorOrPath, StrPath, SupportsGetItem
2
- from collections.abc import Container, Generator, Iterable, Mapping
3
- from logging import Logger, _ExcInfoType
4
- from multiprocessing import JoinableQueue
5
- from multiprocessing.synchronize import Lock
6
- from typing import Any, ClassVar, Final, NoReturn, overload
7
-
8
- from .btm_matcher import BottomMatcher
9
- from .fixer_base import BaseFix
10
- from .pgen2.driver import Driver
11
- from .pgen2.grammar import Grammar
12
- from .pytree import Node
13
-
14
- def get_all_fix_names(fixer_pkg: str, remove_prefix: bool = True) -> list[str]: ...
15
- def get_fixers_from_package(pkg_name: str) -> list[str]: ...
16
-
17
- class FixerError(Exception): ...
18
-
19
- class RefactoringTool:
20
- CLASS_PREFIX: ClassVar[str]
21
- FILE_PREFIX: ClassVar[str]
22
- fixers: Iterable[str]
23
- explicit: Container[str]
24
- options: dict[str, Any]
25
- grammar: Grammar
26
- write_unchanged_files: bool
27
- errors: list[tuple[str, Iterable[str], dict[str, _ExcInfoType]]]
28
- logger: Logger
29
- fixer_log: list[str]
30
- wrote: bool
31
- driver: Driver
32
- pre_order: list[BaseFix]
33
- post_order: list[BaseFix]
34
- files: list[StrPath]
35
- BM: BottomMatcher
36
- bmi_pre_order: list[BaseFix]
37
- bmi_post_order: list[BaseFix]
38
- def __init__(
39
- self, fixer_names: Iterable[str], options: Mapping[str, object] | None = None, explicit: Container[str] | None = None
40
- ) -> None: ...
41
- def get_fixers(self) -> tuple[list[BaseFix], list[BaseFix]]: ...
42
- def log_error(self, msg: str, *args: Iterable[str], **kwargs: _ExcInfoType) -> NoReturn: ...
43
- @overload
44
- def log_message(self, msg: object) -> None: ...
45
- @overload
46
- def log_message(self, msg: str, *args: object) -> None: ...
47
- @overload
48
- def log_debug(self, msg: object) -> None: ...
49
- @overload
50
- def log_debug(self, msg: str, *args: object) -> None: ...
51
- def print_output(self, old_text: str, new_text: str, filename: StrPath, equal: bool) -> None: ...
52
- def refactor(self, items: Iterable[str], write: bool = False, doctests_only: bool = False) -> None: ...
53
- def refactor_dir(self, dir_name: str, write: bool = False, doctests_only: bool = False) -> None: ...
54
- def _read_python_source(self, filename: FileDescriptorOrPath) -> tuple[str, str]: ...
55
- def refactor_file(self, filename: StrPath, write: bool = False, doctests_only: bool = False) -> None: ...
56
- def refactor_string(self, data: str, name: str) -> Node | None: ...
57
- def refactor_stdin(self, doctests_only: bool = False) -> None: ...
58
- def refactor_tree(self, tree: Node, name: str) -> bool: ...
59
- def traverse_by(self, fixers: SupportsGetItem[int, Iterable[BaseFix]] | None, traversal: Iterable[Node]) -> None: ...
60
- def processed_file(
61
- self, new_text: str, filename: StrPath, old_text: str | None = None, write: bool = False, encoding: str | None = None
62
- ) -> None: ...
63
- def write_file(self, new_text: str, filename: FileDescriptorOrPath, old_text: str, encoding: str | None = None) -> None: ...
64
- PS1: Final = ">>> "
65
- PS2: Final = "... "
66
- def refactor_docstring(self, input: str, filename: StrPath) -> str: ...
67
- def refactor_doctest(self, block: list[str], lineno: int, indent: int, filename: StrPath) -> list[str]: ...
68
- def summarize(self) -> None: ...
69
- def parse_block(self, block: Iterable[str], lineno: int, indent: int) -> Node: ...
70
- def wrap_toks(
71
- self, block: Iterable[str], lineno: int, indent: int
72
- ) -> Generator[tuple[int, str, tuple[int, int], tuple[int, int], str], None, None]: ...
73
- def gen_lines(self, block: Iterable[str], indent: int) -> Generator[str, None, None]: ...
74
-
75
- class MultiprocessingUnsupported(Exception): ...
76
-
77
- class MultiprocessRefactoringTool(RefactoringTool):
78
- queue: JoinableQueue[None | tuple[Iterable[str], bool | int]] | None
79
- output_lock: Lock | None
80
- def refactor(
81
- self, items: Iterable[str], write: bool = False, doctests_only: bool = False, num_processes: int = 1
82
- ) -> None: ...
1
+ from _typeshed import FileDescriptorOrPath, StrPath, SupportsGetItem
2
+ from collections.abc import Container, Generator, Iterable, Mapping
3
+ from logging import Logger, _ExcInfoType
4
+ from multiprocessing import JoinableQueue
5
+ from multiprocessing.synchronize import Lock
6
+ from typing import Any, ClassVar, Final, NoReturn, overload
7
+
8
+ from .btm_matcher import BottomMatcher
9
+ from .fixer_base import BaseFix
10
+ from .pgen2.driver import Driver
11
+ from .pgen2.grammar import Grammar
12
+ from .pytree import Node
13
+
14
+ def get_all_fix_names(fixer_pkg: str, remove_prefix: bool = True) -> list[str]: ...
15
+ def get_fixers_from_package(pkg_name: str) -> list[str]: ...
16
+
17
+ class FixerError(Exception): ...
18
+
19
+ class RefactoringTool:
20
+ CLASS_PREFIX: ClassVar[str]
21
+ FILE_PREFIX: ClassVar[str]
22
+ fixers: Iterable[str]
23
+ explicit: Container[str]
24
+ options: dict[str, Any]
25
+ grammar: Grammar
26
+ write_unchanged_files: bool
27
+ errors: list[tuple[str, Iterable[str], dict[str, _ExcInfoType]]]
28
+ logger: Logger
29
+ fixer_log: list[str]
30
+ wrote: bool
31
+ driver: Driver
32
+ pre_order: list[BaseFix]
33
+ post_order: list[BaseFix]
34
+ files: list[StrPath]
35
+ BM: BottomMatcher
36
+ bmi_pre_order: list[BaseFix]
37
+ bmi_post_order: list[BaseFix]
38
+ def __init__(
39
+ self, fixer_names: Iterable[str], options: Mapping[str, object] | None = None, explicit: Container[str] | None = None
40
+ ) -> None: ...
41
+ def get_fixers(self) -> tuple[list[BaseFix], list[BaseFix]]: ...
42
+ def log_error(self, msg: str, *args: Iterable[str], **kwargs: _ExcInfoType) -> NoReturn: ...
43
+ @overload
44
+ def log_message(self, msg: object) -> None: ...
45
+ @overload
46
+ def log_message(self, msg: str, *args: object) -> None: ...
47
+ @overload
48
+ def log_debug(self, msg: object) -> None: ...
49
+ @overload
50
+ def log_debug(self, msg: str, *args: object) -> None: ...
51
+ def print_output(self, old_text: str, new_text: str, filename: StrPath, equal: bool) -> None: ...
52
+ def refactor(self, items: Iterable[str], write: bool = False, doctests_only: bool = False) -> None: ...
53
+ def refactor_dir(self, dir_name: str, write: bool = False, doctests_only: bool = False) -> None: ...
54
+ def _read_python_source(self, filename: FileDescriptorOrPath) -> tuple[str, str]: ...
55
+ def refactor_file(self, filename: StrPath, write: bool = False, doctests_only: bool = False) -> None: ...
56
+ def refactor_string(self, data: str, name: str) -> Node | None: ...
57
+ def refactor_stdin(self, doctests_only: bool = False) -> None: ...
58
+ def refactor_tree(self, tree: Node, name: str) -> bool: ...
59
+ def traverse_by(self, fixers: SupportsGetItem[int, Iterable[BaseFix]] | None, traversal: Iterable[Node]) -> None: ...
60
+ def processed_file(
61
+ self, new_text: str, filename: StrPath, old_text: str | None = None, write: bool = False, encoding: str | None = None
62
+ ) -> None: ...
63
+ def write_file(self, new_text: str, filename: FileDescriptorOrPath, old_text: str, encoding: str | None = None) -> None: ...
64
+ PS1: Final = ">>> "
65
+ PS2: Final = "... "
66
+ def refactor_docstring(self, input: str, filename: StrPath) -> str: ...
67
+ def refactor_doctest(self, block: list[str], lineno: int, indent: int, filename: StrPath) -> list[str]: ...
68
+ def summarize(self) -> None: ...
69
+ def parse_block(self, block: Iterable[str], lineno: int, indent: int) -> Node: ...
70
+ def wrap_toks(
71
+ self, block: Iterable[str], lineno: int, indent: int
72
+ ) -> Generator[tuple[int, str, tuple[int, int], tuple[int, int], str], None, None]: ...
73
+ def gen_lines(self, block: Iterable[str], indent: int) -> Generator[str, None, None]: ...
74
+
75
+ class MultiprocessingUnsupported(Exception): ...
76
+
77
+ class MultiprocessRefactoringTool(RefactoringTool):
78
+ queue: JoinableQueue[None | tuple[Iterable[str], bool | int]] | None
79
+ output_lock: Lock | None
80
+ def refactor(
81
+ self, items: Iterable[str], write: bool = False, doctests_only: bool = False, num_processes: int = 1
82
+ ) -> None: ...
@@ -1,11 +1,11 @@
1
- from collections.abc import Mapping, Sequence
2
- from typing_extensions import TypeAlias
3
-
4
- _Cap: TypeAlias = dict[str, str | int]
5
-
6
- __all__ = ["getcaps", "findmatch"]
7
-
8
- def findmatch(
9
- caps: Mapping[str, list[_Cap]], MIMEtype: str, key: str = "view", filename: str = "/dev/null", plist: Sequence[str] = []
10
- ) -> tuple[str | None, _Cap | None]: ...
11
- def getcaps() -> dict[str, list[_Cap]]: ...
1
+ from collections.abc import Mapping, Sequence
2
+ from typing_extensions import TypeAlias
3
+
4
+ _Cap: TypeAlias = dict[str, str | int]
5
+
6
+ __all__ = ["getcaps", "findmatch"]
7
+
8
+ def findmatch(
9
+ caps: Mapping[str, list[_Cap]], MIMEtype: str, key: str = "view", filename: str = "/dev/null", plist: Sequence[str] = []
10
+ ) -> tuple[str | None, _Cap | None]: ...
11
+ def getcaps() -> dict[str, list[_Cap]]: ...
@@ -122,55 +122,7 @@ if sys.version_info >= (3, 13):
122
122
  ...
123
123
 
124
124
  else:
125
- def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /) -> None:
126
- """
127
- Write the value on the open file.
128
-
129
- value
130
- Must be a supported type.
131
- file
132
- Must be a writeable binary file.
133
- version
134
- Indicates the data format that dump should use.
135
-
136
- If the value has (or contains an object that has) an unsupported type, a
137
- ValueError exception is raised - but garbage data will also be written
138
- to the file. The object will not be properly read back by load().
139
- """
140
- ...
141
- def load(file: SupportsRead[bytes], /) -> Any:
142
- """
143
- Read one value from the open file and return it.
144
-
145
- file
146
- Must be readable binary file.
147
-
148
- If no valid value is read (e.g. because the data has a different Python
149
- version's incompatible marshal format), raise EOFError, ValueError or
150
- TypeError.
151
-
152
- Note: If an object containing an unsupported type was marshalled with
153
- dump(), load() will substitute None for the unmarshallable type.
154
- """
155
- ...
156
- def dumps(value: _Marshallable, version: int = 4, /) -> bytes:
157
- """
158
- Return the bytes object that would be written to a file by dump(value, file).
159
-
160
- value
161
- Must be a supported type.
162
- version
163
- Indicates the data format that dumps should use.
164
-
165
- Raise a ValueError exception if value has (or contains an object that has) an
166
- unsupported type.
167
- """
168
- ...
169
- def loads(bytes: ReadableBuffer, /) -> Any:
170
- """
171
- Convert the bytes-like object to a value.
172
-
173
- If no valid value is found, raise EOFError, ValueError or TypeError. Extra
174
- bytes in the input are ignored.
175
- """
176
- ...
125
+ def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /) -> None: ...
126
+ def load(file: SupportsRead[bytes], /) -> Any: ...
127
+ def dumps(value: _Marshallable, version: int = 4, /) -> bytes: ...
128
+ def loads(bytes: ReadableBuffer, /) -> Any: ...
@@ -208,9 +208,7 @@ if sys.version_info >= (3, 9):
208
208
  ...
209
209
 
210
210
  else:
211
- def gcd(x: SupportsIndex, y: SupportsIndex, /) -> int:
212
- """greatest common divisor of x and y"""
213
- ...
211
+ def gcd(x: SupportsIndex, y: SupportsIndex, /) -> int: ...
214
212
 
215
213
  def hypot(*coordinates: _SupportsFloatOrIndex) -> float:
216
214
  """
@@ -327,9 +325,7 @@ if sys.version_info >= (3, 12):
327
325
  ...
328
326
 
329
327
  elif sys.version_info >= (3, 9):
330
- def nextafter(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float:
331
- """Return the next floating-point value after x towards y."""
332
- ...
328
+ def nextafter(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ...
333
329
 
334
330
  def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int:
335
331
  """
@@ -1,177 +1,177 @@
1
- import sys
2
- from collections.abc import Container, Iterable, Sequence
3
- from types import ModuleType
4
- from typing import Any, Literal
5
-
6
- if sys.platform == "win32":
7
- from _msi import *
8
- from _msi import _Database
9
-
10
- AMD64: bool
11
- Win64: bool
12
-
13
- datasizemask: Literal[0x00FF]
14
- type_valid: Literal[0x0100]
15
- type_localizable: Literal[0x0200]
16
- typemask: Literal[0x0C00]
17
- type_long: Literal[0x0000]
18
- type_short: Literal[0x0400]
19
- type_string: Literal[0x0C00]
20
- type_binary: Literal[0x0800]
21
- type_nullable: Literal[0x1000]
22
- type_key: Literal[0x2000]
23
- knownbits: Literal[0x3FFF]
24
-
25
- class Table:
26
- name: str
27
- fields: list[tuple[int, str, int]]
28
- def __init__(self, name: str) -> None: ...
29
- def add_field(self, index: int, name: str, type: int) -> None: ...
30
- def sql(self) -> str: ...
31
- def create(self, db: _Database) -> None: ...
32
-
33
- class _Unspecified: ...
34
-
35
- def change_sequence(
36
- seq: Sequence[tuple[str, str | None, int]],
37
- action: str,
38
- seqno: int | type[_Unspecified] = ...,
39
- cond: str | type[_Unspecified] = ...,
40
- ) -> None: ...
41
- def add_data(db: _Database, table: str, values: Iterable[tuple[Any, ...]]) -> None: ...
42
- def add_stream(db: _Database, name: str, path: str) -> None: ...
43
- def init_database(
44
- name: str, schema: ModuleType, ProductName: str, ProductCode: str, ProductVersion: str, Manufacturer: str
45
- ) -> _Database: ...
46
- def add_tables(db: _Database, module: ModuleType) -> None: ...
47
- def make_id(str: str) -> str: ...
48
- def gen_uuid() -> str: ...
49
-
50
- class CAB:
51
- name: str
52
- files: list[tuple[str, str]]
53
- filenames: set[str]
54
- index: int
55
- def __init__(self, name: str) -> None: ...
56
- def gen_id(self, file: str) -> str: ...
57
- def append(self, full: str, file: str, logical: str) -> tuple[int, str]: ...
58
- def commit(self, db: _Database) -> None: ...
59
-
60
- _directories: set[str]
61
-
62
- class Directory:
63
- db: _Database
64
- cab: CAB
65
- basedir: str
66
- physical: str
67
- logical: str
68
- component: str | None
69
- short_names: set[str]
70
- ids: set[str]
71
- keyfiles: dict[str, str]
72
- componentflags: int | None
73
- absolute: str
74
- def __init__(
75
- self,
76
- db: _Database,
77
- cab: CAB,
78
- basedir: str,
79
- physical: str,
80
- _logical: str,
81
- default: str,
82
- componentflags: int | None = None,
83
- ) -> None: ...
84
- def start_component(
85
- self,
86
- component: str | None = None,
87
- feature: Feature | None = None,
88
- flags: int | None = None,
89
- keyfile: str | None = None,
90
- uuid: str | None = None,
91
- ) -> None: ...
92
- def make_short(self, file: str) -> str: ...
93
- def add_file(self, file: str, src: str | None = None, version: str | None = None, language: str | None = None) -> str: ...
94
- def glob(self, pattern: str, exclude: Container[str] | None = None) -> list[str]: ...
95
- def remove_pyc(self) -> None: ...
96
-
97
- class Binary:
98
- name: str
99
- def __init__(self, fname: str) -> None: ...
100
-
101
- class Feature:
102
- id: str
103
- def __init__(
104
- self,
105
- db: _Database,
106
- id: str,
107
- title: str,
108
- desc: str,
109
- display: int,
110
- level: int = 1,
111
- parent: Feature | None = None,
112
- directory: str | None = None,
113
- attributes: int = 0,
114
- ) -> None: ...
115
- def set_current(self) -> None: ...
116
-
117
- class Control:
118
- dlg: Dialog
119
- name: str
120
- def __init__(self, dlg: Dialog, name: str) -> None: ...
121
- def event(self, event: str, argument: str, condition: str = "1", ordering: int | None = None) -> None: ...
122
- def mapping(self, event: str, attribute: str) -> None: ...
123
- def condition(self, action: str, condition: str) -> None: ...
124
-
125
- class RadioButtonGroup(Control):
126
- property: str
127
- index: int
128
- def __init__(self, dlg: Dialog, name: str, property: str) -> None: ...
129
- def add(self, name: str, x: int, y: int, w: int, h: int, text: str, value: str | None = None) -> None: ...
130
-
131
- class Dialog:
132
- db: _Database
133
- name: str
134
- x: int
135
- y: int
136
- w: int
137
- h: int
138
- def __init__(
139
- self,
140
- db: _Database,
141
- name: str,
142
- x: int,
143
- y: int,
144
- w: int,
145
- h: int,
146
- attr: int,
147
- title: str,
148
- first: str,
149
- default: str,
150
- cancel: str,
151
- ) -> None: ...
152
- def control(
153
- self,
154
- name: str,
155
- type: str,
156
- x: int,
157
- y: int,
158
- w: int,
159
- h: int,
160
- attr: int,
161
- prop: str | None,
162
- text: str | None,
163
- next: str | None,
164
- help: str | None,
165
- ) -> Control: ...
166
- def text(self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None) -> Control: ...
167
- def bitmap(self, name: str, x: int, y: int, w: int, h: int, text: str | None) -> Control: ...
168
- def line(self, name: str, x: int, y: int, w: int, h: int) -> Control: ...
169
- def pushbutton(
170
- self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None, next: str | None
171
- ) -> Control: ...
172
- def radiogroup(
173
- self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None
174
- ) -> RadioButtonGroup: ...
175
- def checkbox(
176
- self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None
177
- ) -> Control: ...
1
+ import sys
2
+ from collections.abc import Container, Iterable, Sequence
3
+ from types import ModuleType
4
+ from typing import Any, Literal
5
+
6
+ if sys.platform == "win32":
7
+ from _msi import *
8
+ from _msi import _Database
9
+
10
+ AMD64: bool
11
+ Win64: bool
12
+
13
+ datasizemask: Literal[0x00FF]
14
+ type_valid: Literal[0x0100]
15
+ type_localizable: Literal[0x0200]
16
+ typemask: Literal[0x0C00]
17
+ type_long: Literal[0x0000]
18
+ type_short: Literal[0x0400]
19
+ type_string: Literal[0x0C00]
20
+ type_binary: Literal[0x0800]
21
+ type_nullable: Literal[0x1000]
22
+ type_key: Literal[0x2000]
23
+ knownbits: Literal[0x3FFF]
24
+
25
+ class Table:
26
+ name: str
27
+ fields: list[tuple[int, str, int]]
28
+ def __init__(self, name: str) -> None: ...
29
+ def add_field(self, index: int, name: str, type: int) -> None: ...
30
+ def sql(self) -> str: ...
31
+ def create(self, db: _Database) -> None: ...
32
+
33
+ class _Unspecified: ...
34
+
35
+ def change_sequence(
36
+ seq: Sequence[tuple[str, str | None, int]],
37
+ action: str,
38
+ seqno: int | type[_Unspecified] = ...,
39
+ cond: str | type[_Unspecified] = ...,
40
+ ) -> None: ...
41
+ def add_data(db: _Database, table: str, values: Iterable[tuple[Any, ...]]) -> None: ...
42
+ def add_stream(db: _Database, name: str, path: str) -> None: ...
43
+ def init_database(
44
+ name: str, schema: ModuleType, ProductName: str, ProductCode: str, ProductVersion: str, Manufacturer: str
45
+ ) -> _Database: ...
46
+ def add_tables(db: _Database, module: ModuleType) -> None: ...
47
+ def make_id(str: str) -> str: ...
48
+ def gen_uuid() -> str: ...
49
+
50
+ class CAB:
51
+ name: str
52
+ files: list[tuple[str, str]]
53
+ filenames: set[str]
54
+ index: int
55
+ def __init__(self, name: str) -> None: ...
56
+ def gen_id(self, file: str) -> str: ...
57
+ def append(self, full: str, file: str, logical: str) -> tuple[int, str]: ...
58
+ def commit(self, db: _Database) -> None: ...
59
+
60
+ _directories: set[str]
61
+
62
+ class Directory:
63
+ db: _Database
64
+ cab: CAB
65
+ basedir: str
66
+ physical: str
67
+ logical: str
68
+ component: str | None
69
+ short_names: set[str]
70
+ ids: set[str]
71
+ keyfiles: dict[str, str]
72
+ componentflags: int | None
73
+ absolute: str
74
+ def __init__(
75
+ self,
76
+ db: _Database,
77
+ cab: CAB,
78
+ basedir: str,
79
+ physical: str,
80
+ _logical: str,
81
+ default: str,
82
+ componentflags: int | None = None,
83
+ ) -> None: ...
84
+ def start_component(
85
+ self,
86
+ component: str | None = None,
87
+ feature: Feature | None = None,
88
+ flags: int | None = None,
89
+ keyfile: str | None = None,
90
+ uuid: str | None = None,
91
+ ) -> None: ...
92
+ def make_short(self, file: str) -> str: ...
93
+ def add_file(self, file: str, src: str | None = None, version: str | None = None, language: str | None = None) -> str: ...
94
+ def glob(self, pattern: str, exclude: Container[str] | None = None) -> list[str]: ...
95
+ def remove_pyc(self) -> None: ...
96
+
97
+ class Binary:
98
+ name: str
99
+ def __init__(self, fname: str) -> None: ...
100
+
101
+ class Feature:
102
+ id: str
103
+ def __init__(
104
+ self,
105
+ db: _Database,
106
+ id: str,
107
+ title: str,
108
+ desc: str,
109
+ display: int,
110
+ level: int = 1,
111
+ parent: Feature | None = None,
112
+ directory: str | None = None,
113
+ attributes: int = 0,
114
+ ) -> None: ...
115
+ def set_current(self) -> None: ...
116
+
117
+ class Control:
118
+ dlg: Dialog
119
+ name: str
120
+ def __init__(self, dlg: Dialog, name: str) -> None: ...
121
+ def event(self, event: str, argument: str, condition: str = "1", ordering: int | None = None) -> None: ...
122
+ def mapping(self, event: str, attribute: str) -> None: ...
123
+ def condition(self, action: str, condition: str) -> None: ...
124
+
125
+ class RadioButtonGroup(Control):
126
+ property: str
127
+ index: int
128
+ def __init__(self, dlg: Dialog, name: str, property: str) -> None: ...
129
+ def add(self, name: str, x: int, y: int, w: int, h: int, text: str, value: str | None = None) -> None: ...
130
+
131
+ class Dialog:
132
+ db: _Database
133
+ name: str
134
+ x: int
135
+ y: int
136
+ w: int
137
+ h: int
138
+ def __init__(
139
+ self,
140
+ db: _Database,
141
+ name: str,
142
+ x: int,
143
+ y: int,
144
+ w: int,
145
+ h: int,
146
+ attr: int,
147
+ title: str,
148
+ first: str,
149
+ default: str,
150
+ cancel: str,
151
+ ) -> None: ...
152
+ def control(
153
+ self,
154
+ name: str,
155
+ type: str,
156
+ x: int,
157
+ y: int,
158
+ w: int,
159
+ h: int,
160
+ attr: int,
161
+ prop: str | None,
162
+ text: str | None,
163
+ next: str | None,
164
+ help: str | None,
165
+ ) -> Control: ...
166
+ def text(self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None) -> Control: ...
167
+ def bitmap(self, name: str, x: int, y: int, w: int, h: int, text: str | None) -> Control: ...
168
+ def line(self, name: str, x: int, y: int, w: int, h: int) -> Control: ...
169
+ def pushbutton(
170
+ self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None, next: str | None
171
+ ) -> Control: ...
172
+ def radiogroup(
173
+ self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None
174
+ ) -> RadioButtonGroup: ...
175
+ def checkbox(
176
+ self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None
177
+ ) -> Control: ...