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
Ensured Tree types do not create lowercase node on attribute access #2331
Conversation
I'm always nervous when I see changes to Tree behaviour. I agree with the changes as described but would you mind adding a few unit tests to check node insertion with lowercase names? There should already be tests inserting nodes starting with upper-case letters but if there aren't, a couple of those would be good to add as well. |
No sounds good, mostly wanted you to review first in case you had any immediate objections in mind. |
I'm wondering if a warning should be issued when this happens. Of course, lowercase method names on layouts/overlays must still work! |
It will trigger an AttributeError as it should.
They do, they get handled first. |
Ok great. I'll merge once new unit tests are added and the tests are green. |
e2240ba
to
bc830e0
Compare
Turns out that AttrTree didn't implement delitem even though some methods referenced it so I ended up implementing it. I've also added a number of tests for AttrTree. |
55dbeb7
to
a950853
Compare
a950853
to
cba0c32
Compare
Ready to merge. |
Let's merge this now. |
Ok. Looks good and worth getting some real testing out of it. |
As discussed in #1182, Tree based objects (e.g. Overlay and Layout) should not insert new lower-case nodes when the attribute is lower case.