-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[waiting for typed_ast changes] Implement PEP 526 in typed_ast #548
Conversation
@@ -89,7 +89,7 @@ class Delete(stmt): | |||
class Assign(stmt): | |||
targets = ... # type: typing.List[expr] | |||
value = ... # type: expr | |||
type_comment = ... # type: Optional[str] | |||
type_comment = ... # type: Union[AST, Optional[str]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be safe to merge this even if typed_ast isn't merged yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gvanrossum It's OK without typed_ast, but mypy will complain about its own code
mypy/fastparse.py:411: error: Argument 1 to "parse_type_comment" has incompatible type
"Union[AST, str]"; expected "str"
So that this PR should go together with the one at mypy. The PR to mypy is made in such a way that it will continue to work with old typed_ast.
@@ -1,2 +1,4 @@ | |||
# This module is a fork of the CPython 2.7 and 3.5 ast modules with PEP 484 support. | |||
# See: https://github.com/dropbox/typed_ast | |||
|
|||
__version__ = ... # type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now no longer part of typed_ast.
Thanks! |
No description provided.