Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python: Add overlay annotations to AST classes#20972

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tausbn wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromtausbn/python-add-ast-overlay-annotations

Conversation

@tausbn
Copy link
Contributor

WIP

... and everything else that it depends on.
@tausbntausbnforce-pushed thetausbn/python-add-ast-overlay-annotations branch from6930b04 to09e1f8dCompareDecember 5, 2025 13:31
@tausbntausbn added the no-change-note-requiredThis PR does not need a change note labelDec 17, 2025
@tausbntausbn marked this pull request as ready for reviewDecember 17, 2025 12:35
CopilotAI review requested due to automatic review settingsDecember 17, 2025 12:35
@tausbntausbn requested a review froma team as acode ownerDecember 17, 2025 12:35
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds overlay annotations to Python QL AST-related classes and modules to support the overlay system. The changes involve adding module-leveloverlay[local] annotations and introducing final class wrappers to enable proper class extension patterns.

Key changes:

  • Addedoverlay[local] andoverlay[global] annotations to approximately 25 QL library files and modules
  • Introduced final class type aliases (e.g.,final class FinalAstNode = AstNode) to support the overlay pattern
  • Refactored class inheritance to useinstanceof syntax where appropriate

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
python/ql/src/analysis/ImportFailure.qlAdded final class wrapper and converted VersionTest to extend it, removed override keyword from toString
python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qllAdded final class wrapper and converted ForLoop to use instanceof syntax
python/ql/lib/semmle/python/types/ImportTime.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/types/Builtins.qllAdded overlay[local?] module annotation with question mark
python/ql/lib/semmle/python/internal/CachedStages.qllAdded overlay[local] to AST module
python/ql/lib/semmle/python/essa/SsaDefinitions.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/essa/SsaCompute.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/essa/Essa.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/essa/Definitions.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Variables.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Stmts.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Scope.qllAdded overlay[local] module annotation and overlay[global] to specific predicates
python/ql/lib/semmle/python/SSA.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Patterns.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Operations.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Module.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Keywords.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Import.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/GuardedControlFlow.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Function.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Flow.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Files.qllAdded overlay[local] module annotation and overlay[global] to getChildContainer method
python/ql/lib/semmle/python/Exprs.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Constants.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Comprehensions.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Comment.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/Class.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/AstGenerated.qllAdded overlay[local] module annotation
python/ql/lib/semmle/python/AstExtended.qllAdded overlay[local] module annotation
python/ql/lib/analysis/DefinitionTracking.qllAdded final class wrapper and refactored NiceLocationExpr, removed redundant toString override

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@@ -1,3 +1,6 @@
overlay[local?]

Choose a reason for hiding this comment

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

The overlay annotation uses 'local?' with a question mark. This appears to be inconsistent with other files which use either 'local' or 'global'. If this is intentional to indicate optional behavior, it should be documented. If not, it should be corrected to match the standard 'overlay[local]' pattern used in other files.

Copilot generated this review using guidance fromrepository custom instructions.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

no-change-note-requiredThis PR does not need a change notePython

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@tausbn

[8]ページ先頭

©2009-2025 Movatter.jp