ladybug-tools / honeybee-core

:honeybee: honeybee core library
https://www.ladybug.tools/honeybee-core/docs/
GNU Affero General Public License v3.0
17 stars 15 forks source link

extension_attributes bug? #540

Closed ed-p-may closed 1 year ago

ed-p-may commented 2 years ago

https://github.com/ladybug-tools/honeybee-core/blob/812b9f744a3a3013ee70a440648407039c3f3aeb/honeybee/properties.py#L153

I think this is a bug, but wanted to check before I sent a PR for it?

The newly added "is_equivalent" method now shows up when "_extension_attributes" property is called? (as does "apply_properties_from_dict" ?). image

I do not believe this is the expected behavior though? But I wanted to make sure before I sent fix? Is it desired for these attributes to show up as part of the "_extension_attributes" list for some reason?

I believe both "apply_properties_from_dict" and "is_equivalent" should get added to the "exclude" list in the parent class, right?

If that is correct, I can make that fix and send along the PR.

chriswmackey commented 1 year ago

Thanks for pointing this out, @PH-Tools . You are right that this should not be showing up there and I guess the only reason why it has not become an issue is because the is_equivalent property isn't like the other extension attributes and doesn't have to_dict methods or anything like that. In any event, I pushed a fix here for the sake of keeping the code clean:

https://github.com/ladybug-tools/honeybee-core/pull/548

Thanks again!