-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Prepare dataflow for local annotations #21138
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
Draft
Draft
+113
−46
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tausbn
tausbn
force-pushed
the
tausbn/python-prepare-for-overlay-annotations
branch
2 times, most recently
from
January 9, 2026 15:23
8c13fc5 to
4ad5118
Compare
Removes the dependence on the (global) `ModuleVariableNode.getARead()`, by adding a local version (that doesn't include `import *` reads) instead.
@tausbn
tausbn
force-pushed
the
tausbn/python-prepare-for-overlay-annotations
branch
from
January 9, 2026 15:38
4ad5118 to
832d6fb
Compare
This may result in more nodes, but it should still be bounded by the number of global variables in the source code.
@tausbn
tausbn
force-pushed
the
tausbn/python-prepare-for-overlay-annotations
branch
from
January 9, 2026 17:01
e5b485f to
fc43d22
Compare
With `ModuleVariableNode`s now appearing for _all_ global variables (not just the ones that actually seem to be used), some of the tests changed a bit. Mostly this was in the form of new flow (because of new nodes that popped into existence). For some inline expectation tests, I opted to instead exclude these results, as there was no suitable location to annotate. For the normal tests, I just accepted the output (after having vetted it carefully, of course).
Overriding both `argumentOf` and `toString` was causing sadness for the local annotations. Easiest fix was to split these out into their own subclasses. The names are perhaps a bit too verbose now (alternative suggestions are welcomed).
@tausbn
tausbn
force-pushed
the
tausbn/python-prepare-for-overlay-annotations
branch
3 times, most recently
from
January 13, 2026 13:33
6c95109 to
45e4b92
Compare
We just create one for each call, not just the ones that capture variables. In the process, we also made the node synthetic, rather than overriding the behaviour of (some) `ControlFlowNode`s.
@tausbn
tausbn
force-pushed
the
tausbn/python-prepare-for-overlay-annotations
branch
2 times, most recently
from
January 13, 2026 13:53
45e4b92 to
1242a7b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains all of the changes that are needed in order to get all of the
overlay[local]annotations to compile.