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.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.LICENSE.txt +42 -0
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/stdlib/_asyncio.pyi +3 -25
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +4 -44
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +2 -16
- package/dist/typeshed-fallback/stdlib/_dbm.pyi +1 -13
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
- package/dist/typeshed-fallback/stdlib/_gdbm.pyi +1 -39
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +7 -28
- package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +6 -48
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_thread.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/aifc.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/array.pyi +3 -17
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +4 -23
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/audioop.pyi +43 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +5 -15
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/builtins.pyi +8 -106
- package/dist/typeshed-fallback/stdlib/cgi.pyi +118 -118
- package/dist/typeshed-fallback/stdlib/cgitb.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/chunk.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/datetime.pyi +4 -12
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +176 -176
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +317 -317
- package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/log.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -30
- package/dist/typeshed-fallback/stdlib/imghdr.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +7 -36
- package/dist/typeshed-fallback/stdlib/lib2to3/btm_matcher.pyi +28 -28
- package/dist/typeshed-fallback/stdlib/lib2to3/fixer_base.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/main.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/driver.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/literals.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/parse.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/token.pyi +69 -69
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.pyi +96 -96
- package/dist/typeshed-fallback/stdlib/lib2to3/pygram.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +117 -127
- package/dist/typeshed-fallback/stdlib/lib2to3/refactor.pyi +82 -82
- package/dist/typeshed-fallback/stdlib/mailcap.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/marshal.pyi +4 -52
- package/dist/typeshed-fallback/stdlib/math.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
- package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/nis.pyi +4 -31
- package/dist/typeshed-fallback/stdlib/nntplib.pyi +125 -125
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
- package/dist/typeshed-fallback/stdlib/pipes.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/sndhdr.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/ssl.pyi +0 -4
- package/dist/typeshed-fallback/stdlib/sunau.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +4 -40
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/tkinter/tix.pyi +299 -299
- package/dist/typeshed-fallback/stdlib/types.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +544 -559
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +1 -6
- package/dist/typeshed-fallback/stdlib/uu.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/xdrlib.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +0 -29
- package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -10
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +3 -9
- package/package.json +1 -1
|
@@ -44,9 +44,7 @@ else:
|
|
|
44
44
|
|
|
45
45
|
class PackageNotFoundError(ModuleNotFoundError):
|
|
46
46
|
@property
|
|
47
|
-
def name(self) -> str:
|
|
48
|
-
"""module name"""
|
|
49
|
-
...
|
|
47
|
+
def name(self) -> str: ... # type: ignore[override]
|
|
50
48
|
|
|
51
49
|
if sys.version_info >= (3, 13):
|
|
52
50
|
_EntryPointBase = object
|
|
@@ -91,12 +89,8 @@ class EntryPoint(_EntryPointBase):
|
|
|
91
89
|
extras: list[str] = ...,
|
|
92
90
|
) -> bool: ... # undocumented
|
|
93
91
|
|
|
94
|
-
def __hash__(self) -> int:
|
|
95
|
-
|
|
96
|
-
...
|
|
97
|
-
def __eq__(self, other: object) -> bool:
|
|
98
|
-
"""Return self==value."""
|
|
99
|
-
...
|
|
92
|
+
def __hash__(self) -> int: ...
|
|
93
|
+
def __eq__(self, other: object) -> bool: ...
|
|
100
94
|
if sys.version_info >= (3, 11):
|
|
101
95
|
def __lt__(self, other: object) -> bool: ...
|
|
102
96
|
if sys.version_info < (3, 12):
|
|
@@ -141,19 +135,9 @@ elif sys.version_info >= (3, 10):
|
|
|
141
135
|
extras: list[str] = ...,
|
|
142
136
|
) -> EntryPoints: ...
|
|
143
137
|
@property
|
|
144
|
-
def names(self) -> set[str]:
|
|
145
|
-
"""Return the set of all names of all entry points."""
|
|
146
|
-
...
|
|
138
|
+
def names(self) -> set[str]: ...
|
|
147
139
|
@property
|
|
148
|
-
def groups(self) -> set[str]:
|
|
149
|
-
"""
|
|
150
|
-
Return the set of all groups of all entry points.
|
|
151
|
-
|
|
152
|
-
For coverage while SelectableGroups is present.
|
|
153
|
-
>>> EntryPoints().groups
|
|
154
|
-
set()
|
|
155
|
-
"""
|
|
156
|
-
...
|
|
140
|
+
def groups(self) -> set[str]: ...
|
|
157
141
|
|
|
158
142
|
if sys.version_info >= (3, 10) and sys.version_info < (3, 12):
|
|
159
143
|
class Deprecated(Generic[_KT, _VT]):
|
|
@@ -173,13 +157,7 @@ if sys.version_info >= (3, 10) and sys.version_info < (3, 12):
|
|
|
173
157
|
@property
|
|
174
158
|
def groups(self) -> set[str]: ...
|
|
175
159
|
@property
|
|
176
|
-
def names(self) -> set[str]:
|
|
177
|
-
"""
|
|
178
|
-
for coverage:
|
|
179
|
-
>>> SelectableGroups().names
|
|
180
|
-
set()
|
|
181
|
-
"""
|
|
182
|
-
...
|
|
160
|
+
def names(self) -> set[str]: ...
|
|
183
161
|
@overload
|
|
184
162
|
def select(self) -> Self: ...
|
|
185
163
|
@overload
|
|
@@ -257,14 +235,7 @@ class Distribution(_distribution_parent):
|
|
|
257
235
|
...
|
|
258
236
|
else:
|
|
259
237
|
@property
|
|
260
|
-
def metadata(self) -> Message:
|
|
261
|
-
"""
|
|
262
|
-
Return the parsed metadata for this Distribution.
|
|
263
|
-
|
|
264
|
-
The returned object will have keys that name the various bits of
|
|
265
|
-
metadata. See PEP 566 for details.
|
|
266
|
-
"""
|
|
267
|
-
...
|
|
238
|
+
def metadata(self) -> Message: ...
|
|
268
239
|
@property
|
|
269
240
|
def entry_points(self) -> list[EntryPoint]: ...
|
|
270
241
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
from _typeshed import Incomplete, SupportsGetItem
|
|
2
|
-
from collections import defaultdict
|
|
3
|
-
from collections.abc import Iterable
|
|
4
|
-
|
|
5
|
-
from .fixer_base import BaseFix
|
|
6
|
-
from .pytree import Leaf, Node
|
|
7
|
-
|
|
8
|
-
class BMNode:
|
|
9
|
-
count: Incomplete
|
|
10
|
-
transition_table: Incomplete
|
|
11
|
-
fixers: Incomplete
|
|
12
|
-
id: Incomplete
|
|
13
|
-
content: str
|
|
14
|
-
def __init__(self) -> None: ...
|
|
15
|
-
|
|
16
|
-
class BottomMatcher:
|
|
17
|
-
match: Incomplete
|
|
18
|
-
root: Incomplete
|
|
19
|
-
nodes: Incomplete
|
|
20
|
-
fixers: Incomplete
|
|
21
|
-
logger: Incomplete
|
|
22
|
-
def __init__(self) -> None: ...
|
|
23
|
-
def add_fixer(self, fixer: BaseFix) -> None: ...
|
|
24
|
-
def add(self, pattern: SupportsGetItem[int | slice, Incomplete] | None, start: BMNode) -> list[BMNode]: ...
|
|
25
|
-
def run(self, leaves: Iterable[Leaf]) -> defaultdict[BaseFix, list[Node | Leaf]]: ...
|
|
26
|
-
def print_ac(self) -> None: ...
|
|
27
|
-
|
|
28
|
-
def type_repr(type_num: int) -> str | int: ...
|
|
1
|
+
from _typeshed import Incomplete, SupportsGetItem
|
|
2
|
+
from collections import defaultdict
|
|
3
|
+
from collections.abc import Iterable
|
|
4
|
+
|
|
5
|
+
from .fixer_base import BaseFix
|
|
6
|
+
from .pytree import Leaf, Node
|
|
7
|
+
|
|
8
|
+
class BMNode:
|
|
9
|
+
count: Incomplete
|
|
10
|
+
transition_table: Incomplete
|
|
11
|
+
fixers: Incomplete
|
|
12
|
+
id: Incomplete
|
|
13
|
+
content: str
|
|
14
|
+
def __init__(self) -> None: ...
|
|
15
|
+
|
|
16
|
+
class BottomMatcher:
|
|
17
|
+
match: Incomplete
|
|
18
|
+
root: Incomplete
|
|
19
|
+
nodes: Incomplete
|
|
20
|
+
fixers: Incomplete
|
|
21
|
+
logger: Incomplete
|
|
22
|
+
def __init__(self) -> None: ...
|
|
23
|
+
def add_fixer(self, fixer: BaseFix) -> None: ...
|
|
24
|
+
def add(self, pattern: SupportsGetItem[int | slice, Incomplete] | None, start: BMNode) -> list[BMNode]: ...
|
|
25
|
+
def run(self, leaves: Iterable[Leaf]) -> defaultdict[BaseFix, list[Node | Leaf]]: ...
|
|
26
|
+
def print_ac(self) -> None: ...
|
|
27
|
+
|
|
28
|
+
def type_repr(type_num: int) -> str | int: ...
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
from _typeshed import Incomplete, StrPath
|
|
2
|
-
from abc import ABCMeta, abstractmethod
|
|
3
|
-
from collections.abc import MutableMapping
|
|
4
|
-
from typing import ClassVar, Literal, TypeVar
|
|
5
|
-
|
|
6
|
-
from .pytree import Base, Leaf, Node
|
|
7
|
-
|
|
8
|
-
_N = TypeVar("_N", bound=Base)
|
|
9
|
-
|
|
10
|
-
class BaseFix:
|
|
11
|
-
PATTERN: ClassVar[str | None]
|
|
12
|
-
pattern: Incomplete | None
|
|
13
|
-
pattern_tree: Incomplete | None
|
|
14
|
-
options: Incomplete | None
|
|
15
|
-
filename: Incomplete | None
|
|
16
|
-
numbers: Incomplete
|
|
17
|
-
used_names: Incomplete
|
|
18
|
-
order: ClassVar[Literal["post", "pre"]]
|
|
19
|
-
explicit: ClassVar[bool]
|
|
20
|
-
run_order: ClassVar[int]
|
|
21
|
-
keep_line_order: ClassVar[bool]
|
|
22
|
-
BM_compatible: ClassVar[bool]
|
|
23
|
-
syms: Incomplete
|
|
24
|
-
log: Incomplete
|
|
25
|
-
def __init__(self, options: MutableMapping[str, Incomplete], log: list[str]) -> None: ...
|
|
26
|
-
def compile_pattern(self) -> None: ...
|
|
27
|
-
def set_filename(self, filename: StrPath) -> None: ...
|
|
28
|
-
def match(self, node: _N) -> Literal[False] | dict[str, _N]: ...
|
|
29
|
-
@abstractmethod
|
|
30
|
-
def transform(self, node: Base, results: dict[str, Base]) -> Node | Leaf | None: ...
|
|
31
|
-
def new_name(self, template: str = "xxx_todo_changeme") -> str: ...
|
|
32
|
-
first_log: bool
|
|
33
|
-
def log_message(self, message: str) -> None: ...
|
|
34
|
-
def cannot_convert(self, node: Base, reason: str | None = None) -> None: ...
|
|
35
|
-
def warning(self, node: Base, reason: str) -> None: ...
|
|
36
|
-
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
37
|
-
def finish_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
38
|
-
|
|
39
|
-
class ConditionalFix(BaseFix, metaclass=ABCMeta):
|
|
40
|
-
skip_on: ClassVar[str | None]
|
|
41
|
-
def start_tree(self, tree: Node, filename: StrPath, /) -> None: ...
|
|
42
|
-
def should_skip(self, node: Base) -> bool: ...
|
|
1
|
+
from _typeshed import Incomplete, StrPath
|
|
2
|
+
from abc import ABCMeta, abstractmethod
|
|
3
|
+
from collections.abc import MutableMapping
|
|
4
|
+
from typing import ClassVar, Literal, TypeVar
|
|
5
|
+
|
|
6
|
+
from .pytree import Base, Leaf, Node
|
|
7
|
+
|
|
8
|
+
_N = TypeVar("_N", bound=Base)
|
|
9
|
+
|
|
10
|
+
class BaseFix:
|
|
11
|
+
PATTERN: ClassVar[str | None]
|
|
12
|
+
pattern: Incomplete | None
|
|
13
|
+
pattern_tree: Incomplete | None
|
|
14
|
+
options: Incomplete | None
|
|
15
|
+
filename: Incomplete | None
|
|
16
|
+
numbers: Incomplete
|
|
17
|
+
used_names: Incomplete
|
|
18
|
+
order: ClassVar[Literal["post", "pre"]]
|
|
19
|
+
explicit: ClassVar[bool]
|
|
20
|
+
run_order: ClassVar[int]
|
|
21
|
+
keep_line_order: ClassVar[bool]
|
|
22
|
+
BM_compatible: ClassVar[bool]
|
|
23
|
+
syms: Incomplete
|
|
24
|
+
log: Incomplete
|
|
25
|
+
def __init__(self, options: MutableMapping[str, Incomplete], log: list[str]) -> None: ...
|
|
26
|
+
def compile_pattern(self) -> None: ...
|
|
27
|
+
def set_filename(self, filename: StrPath) -> None: ...
|
|
28
|
+
def match(self, node: _N) -> Literal[False] | dict[str, _N]: ...
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def transform(self, node: Base, results: dict[str, Base]) -> Node | Leaf | None: ...
|
|
31
|
+
def new_name(self, template: str = "xxx_todo_changeme") -> str: ...
|
|
32
|
+
first_log: bool
|
|
33
|
+
def log_message(self, message: str) -> None: ...
|
|
34
|
+
def cannot_convert(self, node: Base, reason: str | None = None) -> None: ...
|
|
35
|
+
def warning(self, node: Base, reason: str) -> None: ...
|
|
36
|
+
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
37
|
+
def finish_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
38
|
+
|
|
39
|
+
class ConditionalFix(BaseFix, metaclass=ABCMeta):
|
|
40
|
+
skip_on: ClassVar[str | None]
|
|
41
|
+
def start_tree(self, tree: Node, filename: StrPath, /) -> None: ...
|
|
42
|
+
def should_skip(self, node: Base) -> bool: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixApply(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixApply(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from typing import ClassVar, Final, Literal
|
|
2
|
-
|
|
3
|
-
from ..fixer_base import BaseFix
|
|
4
|
-
|
|
5
|
-
NAMES: Final[dict[str, str]]
|
|
6
|
-
|
|
7
|
-
class FixAsserts(BaseFix):
|
|
8
|
-
BM_compatible: ClassVar[Literal[False]]
|
|
9
|
-
PATTERN: ClassVar[str]
|
|
10
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from typing import ClassVar, Final, Literal
|
|
2
|
+
|
|
3
|
+
from ..fixer_base import BaseFix
|
|
4
|
+
|
|
5
|
+
NAMES: Final[dict[str, str]]
|
|
6
|
+
|
|
7
|
+
class FixAsserts(BaseFix):
|
|
8
|
+
BM_compatible: ClassVar[Literal[False]]
|
|
9
|
+
PATTERN: ClassVar[str]
|
|
10
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixBasestring(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[Literal["'basestring'"]]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixBasestring(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[Literal["'basestring'"]]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixBuffer(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixBuffer(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
from _typeshed import Incomplete
|
|
2
|
-
from typing import ClassVar, Literal
|
|
3
|
-
|
|
4
|
-
from .. import fixer_base
|
|
5
|
-
|
|
6
|
-
iter_exempt: set[str]
|
|
7
|
-
|
|
8
|
-
class FixDict(fixer_base.BaseFix):
|
|
9
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
10
|
-
PATTERN: ClassVar[str]
|
|
11
|
-
def transform(self, node, results): ...
|
|
12
|
-
P1: ClassVar[str]
|
|
13
|
-
p1: ClassVar[Incomplete]
|
|
14
|
-
P2: ClassVar[str]
|
|
15
|
-
p2: ClassVar[Incomplete]
|
|
16
|
-
def in_special_context(self, node, isiter): ...
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from typing import ClassVar, Literal
|
|
3
|
+
|
|
4
|
+
from .. import fixer_base
|
|
5
|
+
|
|
6
|
+
iter_exempt: set[str]
|
|
7
|
+
|
|
8
|
+
class FixDict(fixer_base.BaseFix):
|
|
9
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
10
|
+
PATTERN: ClassVar[str]
|
|
11
|
+
def transform(self, node, results): ...
|
|
12
|
+
P1: ClassVar[str]
|
|
13
|
+
p1: ClassVar[Incomplete]
|
|
14
|
+
P2: ClassVar[str]
|
|
15
|
+
p2: ClassVar[Incomplete]
|
|
16
|
+
def in_special_context(self, node, isiter): ...
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
from collections.abc import Generator, Iterable
|
|
2
|
-
from typing import ClassVar, Literal, TypeVar
|
|
3
|
-
|
|
4
|
-
from .. import fixer_base
|
|
5
|
-
from ..pytree import Base
|
|
6
|
-
|
|
7
|
-
_N = TypeVar("_N", bound=Base)
|
|
8
|
-
|
|
9
|
-
def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N], None, None]: ...
|
|
10
|
-
|
|
11
|
-
class FixExcept(fixer_base.BaseFix):
|
|
12
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
13
|
-
PATTERN: ClassVar[str]
|
|
14
|
-
def transform(self, node, results): ...
|
|
1
|
+
from collections.abc import Generator, Iterable
|
|
2
|
+
from typing import ClassVar, Literal, TypeVar
|
|
3
|
+
|
|
4
|
+
from .. import fixer_base
|
|
5
|
+
from ..pytree import Base
|
|
6
|
+
|
|
7
|
+
_N = TypeVar("_N", bound=Base)
|
|
8
|
+
|
|
9
|
+
def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N], None, None]: ...
|
|
10
|
+
|
|
11
|
+
class FixExcept(fixer_base.BaseFix):
|
|
12
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
13
|
+
PATTERN: ClassVar[str]
|
|
14
|
+
def transform(self, node, results): ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixExec(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixExec(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixExecfile(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixExecfile(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
from _typeshed import Incomplete, StrPath
|
|
2
|
-
from lib2to3 import fixer_base
|
|
3
|
-
from typing import ClassVar, Literal
|
|
4
|
-
|
|
5
|
-
from ..pytree import Node
|
|
6
|
-
|
|
7
|
-
class FixExitfunc(fixer_base.BaseFix):
|
|
8
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
9
|
-
PATTERN: ClassVar[str]
|
|
10
|
-
def __init__(self, *args) -> None: ...
|
|
11
|
-
sys_import: Incomplete | None
|
|
12
|
-
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
13
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from _typeshed import Incomplete, StrPath
|
|
2
|
+
from lib2to3 import fixer_base
|
|
3
|
+
from typing import ClassVar, Literal
|
|
4
|
+
|
|
5
|
+
from ..pytree import Node
|
|
6
|
+
|
|
7
|
+
class FixExitfunc(fixer_base.BaseFix):
|
|
8
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
9
|
+
PATTERN: ClassVar[str]
|
|
10
|
+
def __init__(self, *args) -> None: ...
|
|
11
|
+
sys_import: Incomplete | None
|
|
12
|
+
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
13
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixFilter(fixer_base.ConditionalFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
skip_on: ClassVar[Literal["future_builtins.filter"]]
|
|
9
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixFilter(fixer_base.ConditionalFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
skip_on: ClassVar[Literal["future_builtins.filter"]]
|
|
9
|
+
def transform(self, node, results): ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixFuncattrs(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixFuncattrs(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixFuture(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixFuture(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixGetcwdu(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixGetcwdu(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import ClassVar, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
class FixHasKey(fixer_base.BaseFix):
|
|
6
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
-
PATTERN: ClassVar[str]
|
|
8
|
-
def transform(self, node, results): ...
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
class FixHasKey(fixer_base.BaseFix):
|
|
6
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
7
|
+
PATTERN: ClassVar[str]
|
|
8
|
+
def transform(self, node, results): ...
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
from typing import ClassVar, Final, Literal
|
|
2
|
-
|
|
3
|
-
from .. import fixer_base
|
|
4
|
-
|
|
5
|
-
CMP: Final[str]
|
|
6
|
-
TYPE: Final[str]
|
|
7
|
-
|
|
8
|
-
class FixIdioms(fixer_base.BaseFix):
|
|
9
|
-
BM_compatible: ClassVar[Literal[False]]
|
|
10
|
-
PATTERN: ClassVar[str]
|
|
11
|
-
def match(self, node): ...
|
|
12
|
-
def transform(self, node, results): ...
|
|
13
|
-
def transform_isinstance(self, node, results): ...
|
|
14
|
-
def transform_while(self, node, results) -> None: ...
|
|
15
|
-
def transform_sort(self, node, results) -> None: ...
|
|
1
|
+
from typing import ClassVar, Final, Literal
|
|
2
|
+
|
|
3
|
+
from .. import fixer_base
|
|
4
|
+
|
|
5
|
+
CMP: Final[str]
|
|
6
|
+
TYPE: Final[str]
|
|
7
|
+
|
|
8
|
+
class FixIdioms(fixer_base.BaseFix):
|
|
9
|
+
BM_compatible: ClassVar[Literal[False]]
|
|
10
|
+
PATTERN: ClassVar[str]
|
|
11
|
+
def match(self, node): ...
|
|
12
|
+
def transform(self, node, results): ...
|
|
13
|
+
def transform_isinstance(self, node, results): ...
|
|
14
|
+
def transform_while(self, node, results) -> None: ...
|
|
15
|
+
def transform_sort(self, node, results) -> None: ...
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
from _typeshed import StrPath
|
|
2
|
-
from collections.abc import Generator
|
|
3
|
-
from typing import ClassVar, Literal
|
|
4
|
-
|
|
5
|
-
from .. import fixer_base
|
|
6
|
-
from ..pytree import Node
|
|
7
|
-
|
|
8
|
-
def traverse_imports(names) -> Generator[str, None, None]: ...
|
|
9
|
-
|
|
10
|
-
class FixImport(fixer_base.BaseFix):
|
|
11
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
12
|
-
PATTERN: ClassVar[str]
|
|
13
|
-
skip: bool
|
|
14
|
-
def start_tree(self, tree: Node, name: StrPath) -> None: ...
|
|
15
|
-
def transform(self, node, results): ...
|
|
16
|
-
def probably_a_local_import(self, imp_name): ...
|
|
1
|
+
from _typeshed import StrPath
|
|
2
|
+
from collections.abc import Generator
|
|
3
|
+
from typing import ClassVar, Literal
|
|
4
|
+
|
|
5
|
+
from .. import fixer_base
|
|
6
|
+
from ..pytree import Node
|
|
7
|
+
|
|
8
|
+
def traverse_imports(names) -> Generator[str, None, None]: ...
|
|
9
|
+
|
|
10
|
+
class FixImport(fixer_base.BaseFix):
|
|
11
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
12
|
+
PATTERN: ClassVar[str]
|
|
13
|
+
skip: bool
|
|
14
|
+
def start_tree(self, tree: Node, name: StrPath) -> None: ...
|
|
15
|
+
def transform(self, node, results): ...
|
|
16
|
+
def probably_a_local_import(self, imp_name): ...
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
from _typeshed import StrPath
|
|
2
|
-
from collections.abc import Generator
|
|
3
|
-
from typing import ClassVar, Final, Literal
|
|
4
|
-
|
|
5
|
-
from .. import fixer_base
|
|
6
|
-
from ..pytree import Node
|
|
7
|
-
|
|
8
|
-
MAPPING: Final[dict[str, str]]
|
|
9
|
-
|
|
10
|
-
def alternates(members): ...
|
|
11
|
-
def build_pattern(mapping=...) -> Generator[str, None, None]: ...
|
|
12
|
-
|
|
13
|
-
class FixImports(fixer_base.BaseFix):
|
|
14
|
-
BM_compatible: ClassVar[Literal[True]]
|
|
15
|
-
mapping = MAPPING
|
|
16
|
-
def build_pattern(self): ...
|
|
17
|
-
def compile_pattern(self) -> None: ...
|
|
18
|
-
def match(self, node): ...
|
|
19
|
-
replace: dict[str, str]
|
|
20
|
-
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
21
|
-
def transform(self, node, results) -> None: ...
|
|
1
|
+
from _typeshed import StrPath
|
|
2
|
+
from collections.abc import Generator
|
|
3
|
+
from typing import ClassVar, Final, Literal
|
|
4
|
+
|
|
5
|
+
from .. import fixer_base
|
|
6
|
+
from ..pytree import Node
|
|
7
|
+
|
|
8
|
+
MAPPING: Final[dict[str, str]]
|
|
9
|
+
|
|
10
|
+
def alternates(members): ...
|
|
11
|
+
def build_pattern(mapping=...) -> Generator[str, None, None]: ...
|
|
12
|
+
|
|
13
|
+
class FixImports(fixer_base.BaseFix):
|
|
14
|
+
BM_compatible: ClassVar[Literal[True]]
|
|
15
|
+
mapping = MAPPING
|
|
16
|
+
def build_pattern(self): ...
|
|
17
|
+
def compile_pattern(self) -> None: ...
|
|
18
|
+
def match(self, node): ...
|
|
19
|
+
replace: dict[str, str]
|
|
20
|
+
def start_tree(self, tree: Node, filename: StrPath) -> None: ...
|
|
21
|
+
def transform(self, node, results) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from typing import Final
|
|
2
|
-
|
|
3
|
-
from . import fix_imports
|
|
4
|
-
|
|
5
|
-
MAPPING: Final[dict[str, str]]
|
|
6
|
-
|
|
7
|
-
class FixImports2(fix_imports.FixImports):
|
|
8
|
-
mapping = MAPPING
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
from . import fix_imports
|
|
4
|
+
|
|
5
|
+
MAPPING: Final[dict[str, str]]
|
|
6
|
+
|
|
7
|
+
class FixImports2(fix_imports.FixImports):
|
|
8
|
+
mapping = MAPPING
|