You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aliases added in #3113 work for getting and setting, including with subscripts, but they raise an error when using in. It's probably a pretty simple fix, but I haven't dug into it yet. I wonder if there might be other edge cases too...
in should return True or False, indicating whether the property has been set or not.
Screenshots
No response
Environment
Toga: main branch
Logs
Traceback (most recent call last):
File "<python-input-13>", line 1, in <module>
"vertical_align_items" in style
File "/Users/charles/toga_dev/toga/travertino/src/travertino/declaration.py", line 408, in __contains__
getattr(self.__class__, name).is_set_on(self)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Pack' has no attribute 'vertical_align_items'
Additional context
I'm starting to wonder if it might be worth adding a notion of aliases to Travertino itself — it could make this process less ad hoc, and easier to predict. However, I'm not sure if there's a feasible way to make it sufficiently flexible to be useful.
The text was updated successfully, but these errors were encountered:
Good catch; definitely something we'll need to look into.
As for adding aliases to Travertino... I'm not expecting that we're going to need a lot of them, so I guess it comes down to whether the mechanics of an alias is easier to coordinate in a "meta" layer. For now, I'm inclined to put that idea on the back burner, and if we find find that there's value in the abstraction (which could include fixing this bug in a consistent way), then we can revisit the idea.
Describe the bug
The aliases added in #3113 work for getting and setting, including with subscripts, but they raise an error when using
in
. It's probably a pretty simple fix, but I haven't dug into it yet. I wonder if there might be other edge cases too...Steps to reproduce
Expected behavior
in
should returnTrue
orFalse
, indicating whether the property has been set or not.Screenshots
No response
Environment
Logs
Additional context
I'm starting to wonder if it might be worth adding a notion of aliases to Travertino itself — it could make this process less ad hoc, and easier to predict. However, I'm not sure if there's a feasible way to make it sufficiently flexible to be useful.
The text was updated successfully, but these errors were encountered: