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

Fix dataclass plugin to work with new semantic analyzer #6515

Merged
merged 3 commits into from
Mar 7, 2019

Conversation

ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi commented Mar 6, 2019

Fixes #6324

This enables two test files that previously had few crashes.

Changes in this PR:

  • Add defer() to public plugin API, otherwise dataclasses will not works with forward references.
  • Update one plugin test to use the new analyzer because the output is a bit more verbose, and probably not worth the hassle of making it identical to old analyzer.
  • One test is skipped because of existing issue New semantic analyzer: should we collect functions from AST instead of symbol tables? #6454
  • Add the generated type variable used for self types to the class body (this is identical to named tuples and attrs plugin).

@ilevkivskyi ilevkivskyi requested a review from JukkaL March 6, 2019 15:54
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

LGTM

@ilevkivskyi ilevkivskyi merged commit 892b8d8 into python:master Mar 7, 2019
@ilevkivskyi ilevkivskyi deleted the new-analyzer-plugins branch March 7, 2019 20:15
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