Skip to content
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

AssignmentExpr is not a BindableExpression #13483

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

hauntsaninja
Copy link
Collaborator

No description provided.


def get_things() -> Union[Tuple[Good], Tuple[Bad]]: ...

if (things := get_things())[0].is_good:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have modified two branches for IndexExpr and MemberExpr, but this new test covers NameExpr. Do we have other two covered?

Copy link
Collaborator Author

@hauntsaninja hauntsaninja Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll fix this tomorrow.

Copy link
Member

@sobolevn sobolevn Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tomorrow has just started in my timezone 😆
(Well, actually 1/2 of tomorrow has already passed 😞)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this new test covers NameExpr

The new test actually covers IndexExpr in the branch above.

I tried adding tests with IndexExpr and MemberExpr inside the walrus, but it turns out that's not valid Python

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@hauntsaninja hauntsaninja merged commit 1f308e9 into python:master Aug 24, 2022
@hauntsaninja hauntsaninja deleted the assign branch August 24, 2022 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants