-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Fix unchecking Display variables and attributes
not updating tree (Outline explorer)
#21481
Conversation
Display variables and attributes
not updating tree (Outline explorer)
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.
Thank you @remisalmon for helping checking for a fix! I think is okay to remove the tree
being nonempty validation. Also, one missing thing is to add a test for this. Maybe the test could use the code example you used to illustrate the update issue, what do you think?
If you need help with the test let us know and again thank you for helping us with this!
Hello @remisalmon! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2023-11-03 04:12:20 UTC |
1428d32
to
eff89d0
Compare
Ignore the pep8speaks message I force pushed a fix but it is not going away :) I added a test that is passing locally (log below). I could not figure out how to get qtbot to click on the
|
Awesome @remisalmon ! I think is okay to use the |
Should be all good now, thank you @dalthviz for reviewing this. |
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.
Thanks @remisalmon !
Description of Changes
This fixes #21456 where unchecking "Display variables and attributes" in the outline does not work.
Issue debug log:
I believe this uses the wrong operator from the
intervaltree
package where the difference operator does work as expected in this case:with a file like:
we get, after unchecking Display variables and attributes:
(the difference returns an empty tree object but the trees are different)
Another fix would be to look at
changes = current_tree - tree
but we do not need the actual difference tree objectchanges
so this makes the code simpler.This also fixes an issue where the tree would not update when "Display variables and attributes" is checked and a variable or attribute is removed from the code.
Tested locally.
Issue(s) Resolved
Fixes #21456
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: remisamon