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

check if ast.JoinedStr exists before using it #446

Merged
merged 1 commit into from
Feb 3, 2019

Conversation

calvinli
Copy link
Contributor

This line with isinstance(..., ast.JoinedStr) was added in d237448 for #427.

ast.JoinedStr is new in Python3.6 (it's f-strings), it does not exist in Pythons below that, so this is an AttributeError: 'module' object has no attribute 'JoinedStr' for Python<3.6.

I'm not sure why travis didn't raise this as an issue, I'm not too familiar with the test suite here so let me know if there's a test that can be added for this.

ast.JoinedStr is new in Python3.6 (it's f-strings), it does not exist in Pythons below that
@calvinli
Copy link
Contributor Author

Hi @ericwb I was told you might have context on this because you merged d237448, could you review this change?

Copy link
Member

@ericwb ericwb left a comment

Choose a reason for hiding this comment

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

LGTM, not sure why Travis isn't catching it.

@ericwb ericwb merged commit 5b244b1 into PyCQA:master Feb 3, 2019
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