-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix detection of mutable objects for repeated object annotations.
Python objects are hashable even if they are mutable, as long as they compare equal by identity only. However, this wasn't correctly detected by the shared value detection logic in treescope; such objects were incorrectly treated as immutable. Additionally, in rare cases reference counting in Python could cause the same object ID to be reused, leading to a spurious repeated object warning. By keeping references to the possibly-repeated objects until finishing rendering, we can avoid this issue. PiperOrigin-RevId: 637319549
- Loading branch information
1 parent
4d08e2b
commit db6ae64
Showing
1 changed file
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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