Skip to content

Python: Add models for builtins map, filter, zip, and enumerate. #18301

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

Merged

Conversation

joefarebrother
Copy link
Contributor

These builtins were missing models; this PR adds support for them.

@joefarebrother joefarebrother changed the title Pythod: Add models for builtins map, filter, zip, and enumerate. [Draft] Python: Add models for builtins map, filter, zip, and enumerate. Dec 17, 2024
@joefarebrother joefarebrother force-pushed the python-model-missing-builtins branch 2 times, most recently from 8128500 to 7e83b0f Compare January 7, 2025 09:35
@joefarebrother joefarebrother force-pushed the python-model-missing-builtins branch 3 times, most recently from 0f2f3f5 to e7649e3 Compare January 15, 2025 09:17
@joefarebrother joefarebrother force-pushed the python-model-missing-builtins branch from e7649e3 to 6a6585e Compare January 15, 2025 09:57
@joefarebrother joefarebrother force-pushed the python-model-missing-builtins branch from 36172dc to 2aea356 Compare January 15, 2025 10:24
@joefarebrother joefarebrother changed the title [Draft] Python: Add models for builtins map, filter, zip, and enumerate. Python: Add models for builtins map, filter, zip, and enumerate. Jan 15, 2025
@joefarebrother joefarebrother marked this pull request as ready for review January 15, 2025 10:27
@Copilot Copilot AI review requested due to automatic review settings January 15, 2025 10:27
@joefarebrother joefarebrother requested a review from a team as a code owner January 15, 2025 10:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • python/ql/lib/semmle/python/frameworks/Stdlib.qll: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

Copy link
Contributor

@yoff yoff left a comment

Choose a reason for hiding this comment

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

This is a clear improvement from the current situation. I think at some point we want to be able to typetrack through these summaries, given that they are widely used built in functions. Ideally, though, we would first create Pre-API::builtin("map"); a way to fairly reliably identify uses of "map" and others without using the real API graph. Then we could easily write all the simple summaries we want.

@joefarebrother joefarebrother merged commit d248fbf into github:main Jan 20, 2025
15 checks passed
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