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

Add support for type annotations to attr: ast parsing #3391

Merged
merged 6 commits into from Jun 19, 2022

Commits on Jun 19, 2022

  1. Add support for annotated assignments to static attribute lookup.

    When walking the ast of a module, look for AnnAssign nodes in addition
    to Assign to support assignments with type annotations, for example.
    Since we have to read different attributes, split the generators into
    a for loop. Existing ast.Assign nodes follow the same processing as
    before.
    karlotness committed Jun 19, 2022
    Copy the full SHA
    685c80c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    15af535 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    0488436 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    6384f26 View commit details
    Browse the repository at this point in the history
  5. config.expand.StaticModule: handle scenarios when annotated assignmen…

    …t does not have a value
    abravalheri committed Jun 19, 2022
    Copy the full SHA
    0b1d090 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #1 from abravalheri/ast-annotation

    Refactor `StaticModule.__getattr__` and fix `ast.AnnAssign` edge case
    karlotness committed Jun 19, 2022
    Copy the full SHA
    7e4cb12 View commit details
    Browse the repository at this point in the history