Skip to content

[waiting for typed_ast changes] Implement PEP 526 in typed_ast #548

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

Merged
merged 6 commits into from
Sep 28, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion third_party/3/typed_ast/ast35.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Copy link
Member

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?

Copy link
Member Author

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.


class AugAssign(stmt):
target = ... # type: expr
Expand Down