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

Prevent more ways to assign to constants #1983

Merged
merged 2 commits into from
Mar 1, 2021

Conversation

Kodiologist
Copy link
Member

Fixes #1780.

@scauligi
Copy link
Member

Test failures on 3.6, 3.7, pypy. My guess is because of this:

Changed in version 3.8: Class ast.Constant is now used for all constants.
Deprecated since version 3.8: Old classes ast.Num, ast.Str, ast.Bytes, ast.NameConstant and ast.Ellipsis are still available, but they will be removed in future Python releases.

So if we still plan to support these versions then you should include these classes in the new check in _storeize.

@Kodiologist
Copy link
Member Author

Yep, thanks for the diagnosis. I'll look into it.

@Kodiologist
Copy link
Member Author

It looks like the assignments are detected properly. The tests of the error messages are just too picky. So I changed the tests.

@Kodiologist Kodiologist merged commit 088e06e into hylang:master Mar 1, 2021
@Kodiologist Kodiologist deleted the constantly-varying branch June 15, 2021 17:45
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.

Detection of illegal assignments is imperfect
3 participants