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

Refactor StaticModule.__getattr__ and fix ast.AnnAssign edge case #1

Merged
merged 3 commits into from Jun 19, 2022

Conversation

abravalheri
Copy link

@abravalheri abravalheri commented Jun 19, 2022

Summary of changes

As discussed in pypa#3391 (comment), this suggestion includes:

  • A refactoring of StaticModule.__getattr__ that introduces back the generators and avoids the duplication in raising exceptions.
  • A fix for the edge case when ast.AnnAssign has a None value
  • Tests to ensure the fix works.

Closes

Pull Request Checklist

@abravalheri abravalheri changed the title Ast annotation Refactor StaticModule.__getattr__ and fix ast.AnnAssign edge case Jun 19, 2022
@karlotness
Copy link
Owner

This looks good, thanks.

@karlotness karlotness merged commit 7e4cb12 into karlotness:ast-annotation Jun 19, 2022
@abravalheri abravalheri deleted the ast-annotation branch June 19, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants