-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support using collections.abc.Callable in type stubs.
See python/typeshed#5055. typeshed is moving toward using types from builtins and collections.abc rather than typing (PEP 585). Mostly, this should just work with pytype, since we rewrite typing.X to builtins.x anyway, and the collections.abc types are represented as aliases of the typing ones. However, typing.Callable has its own pytd node type, so we need to special-case collections.abc.Callable in the parser. Since Tuple also has a special node type, I added a test for Tuple as well - that appears to already be working. PiperOrigin-RevId: 359096397
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters