Skip to content

Python: Allow type tracking through comprehensions#17653

Merged
yoff merged 3 commits into
github:mainfrom
yoff:python/typetracking-through-comprehensions
Oct 8, 2024
Merged

Python: Allow type tracking through comprehensions#17653
yoff merged 3 commits into
github:mainfrom
yoff:python/typetracking-through-comprehensions

Conversation

@yoff

@yoff yoff commented Oct 3, 2024

Copy link
Copy Markdown
Contributor
  • the subscript operator is extended to comprehensions
  • the capture jump-step is extended to work for the functions generated inside comprehensions

Pull Request checklist

All query authors

Internal query authors only

  • Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • Adding a new query? Consider also adding the query to autofix.

- the subscript operator is extended to comprehensions
- the capture jump-step is extended to work for the functions generated inside comprehensions
@github-actions github-actions Bot added the Python label Oct 3, 2024
@yoff yoff marked this pull request as ready for review October 3, 2024 08:10
@yoff yoff requested a review from a team as a code owner October 3, 2024 08:10
@yoff yoff added Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish and removed documentation labels Oct 3, 2024
@yoff

yoff commented Oct 3, 2024

Copy link
Copy Markdown
Contributor Author

Possibly a small performance penalty, but reasonable for the added flow:

source a_m a_std b_m b_std diff relative
Median (excl. partials)         1 0.0156
Overall (excl. partials) 3944   3969   25 0.00634

@yoff yoff removed the Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish label Oct 3, 2024

@tausbn tausbn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Thanks for the quick chat about jump steps.

@yoff yoff merged commit 1f1b1b7 into github:main Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants