Repository navigation
Added fixers to lib2to3 - #10003
Added fixers to lib2to3#10003
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks for all the work, but given that this is a lot of new stubs and lib2to3 is deprecated (to be removed in 3.13), I'm not sure we should really be adding all this. |
This comment has been minimized.
This comment has been minimized.
|
Up to you! There's still a while before 3.13. Most of the changes came from stubgen and some search&replace. |
|
Personally, I'm fine with adding this, although we could do a superficial review for the newly added files. |
|
Yes, I suppose there's no harm in it. I will take a quick look and merge this. |
| def run(self, leaves: Iterable[Leaf]) -> defaultdict[BaseFix, list[Node | Leaf]]: ... | ||
| def print_ac(self) -> None: ... | ||
|
|
||
| def type_repr(type_num: _T) -> _T: ... |
There was a problem hiding this comment.
| def type_repr(type_num: _T) -> _T: ... | |
| def type_repr(type_num: int) -> str | int: ... |
It takes the number of a parse tree node and returns either its name or the number again if it isn't found.
|
|
||
| class FixFuture(fixer_base.BaseFix): | ||
| BM_compatible: ClassVar[Literal[True]] | ||
| PATTERN: ClassVar[LiteralString] |
There was a problem hiding this comment.
I don't think LiteralString makes much sense in cases like this. Let's avoid using it.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Did this a while ago and forgot to PR. Wanted to take a look at some of the oldest issues and this one didn't seem too hard.
Closes #2510 , the least recently updated issue in typeshed (as of starting this PR)!
Add all missing stubs in lib2to3. pyright-complete most of it.