Replace some _anytrait_changed methods#625
Conversation
|
The occurrence in However, this may lead to some confusion. Additionally, the metadata use in |
|
looks like the intermittent failure on On linux/pyqt |
| ] | ||
| if name in invalidate_traits: | ||
| self._invalidate() | ||
| @observe("+is_visual") |
There was a problem hiding this comment.
I think I prefer listing out the various traits that need to be observed here - instead of introducing new trait metadata. If we can make do without adding anything new, we should persue that option imo. I feel like introducing new trait metadata introduces a new maintenance/cognitive overhead.
| "max_y", | ||
| ]: | ||
| self.compute_model() | ||
| @observe("+needs_compute") |
There was a problem hiding this comment.
same comment as before - i'd prefer verbosely listing out all of the traits that we want to listen to - instead of introducing new trait metadata.
closes #624
Note there are still a few examples using
_anytrait_changedmethods that can be addressed in a different PR. I ended up not using metadata in thelegend.pyand just went with the straight forward conversion to observe. We can come back to this if we want to be a little more clever later.