-
Notifications
You must be signed in to change notification settings - Fork 192
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
Handle string annotations in ScopeProvider #373
Conversation
09f0418
to
fcd8564
Compare
fcd8564
to
c1f7b80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the missing return False
, LGTM.
c1f7b80
to
fa15c98
Compare
value = node.evaluated_value | ||
if value: | ||
mod = cst.parse_module(value) | ||
mod.visit(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a subtle problem with this approach that I only just discovered. Running self
on another module will mean we'll collect CST nodes that don't appear in the original CST. That means anyone using these collected nodes will not be able to meaningfully use them (for example to look up other metadata for them, like position). I'll open a separate issue.
Summary
This adds support for string annotations to ScopeProvider
Test Plan
Run tests