-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix annotation scope, deadlock, MRO, and HEAPTYPE issues #7087
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
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 787
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1028
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 703
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1004
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 822
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 672
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 738
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 4782
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 834
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1376
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1296
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 7690
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 2926
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1573
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 5711
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 2709
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 5474
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 949
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 3090
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 853
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 2232
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 5578
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1079
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 162
🌐 Web query:
indexmap IndexSet insert behavior documentation💡 Result:
In
indexmap::IndexSet,insertbehaves like this:IndexSet::insert(&mut self, value: T) -> boolinsertsvalueonly if an equivalent value is not already present.trueif it inserted a new element.falseif the set already contained an equivalent element; in that case it keeps the original stored value and does not change its insertion order. [1]Related ordering note:
IndexSetiteration order is determined by the history of insertions/removals, and a re-insertion attempt of an already-present element does not affect the order or stored value. [2]If you also need the index:
IndexSet::insert_full(&mut self, value: T) -> (usize, bool)returns (index, inserted?) with the same “no replace, no reorder on duplicates” behavior. [3]Sources:
[1] https://docs.rs/indexmap/latest/indexmap/set/struct.IndexSet.html (method
insert)[2] https://docs.rs/indexmap/latest/indexmap/set/struct.IndexSet.html (section “Order”)
[3] https://docs.rs/indexmap/latest/indexmap/set/struct.IndexSet.html (method
insert_full)🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 479
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 4561
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 4487
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 937
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 2089
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 7510
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1189
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 829
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1714
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1380
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 3150
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 4291
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1977
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 5569
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1558
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 911
Use
get_local_var_index()to loadformatparameter instead of hardcoding index 0.During symbol table analysis,
"format"is registered as a parameter in these TypeParams scopes before any other symbols, so it correctly appears at index 0. However, relying on this implicit ordering is fragile. Useget_local_var_index("format")inemit_format_validation()to explicitly resolve the parameter's index, making the intent clear and the code more resilient to future changes.🛠️ Suggested fix in
emit_format_validationAlso applies to: 2535-2538, 2684-2687
🤖 Prompt for AI Agents