-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Confusion around style properties which accept NONE values #1502
Comments
This also affects the properties
|
Thanks for formalising the report from Discord. There's a couple of co-morbid issues here:
|
The initial error was fixed by beeware/travertino#33, but the other issues still remain. |
Reported on Discord by "willow <3", and verified by me.
The Pack documentation says that
none
is allowed as the value of several properties. However, I can't find any tests for this, and it doesn't actually work.For example, if you call
Pack(visibility="none")
, you get this error:Passing a Python
None
gives the same error message, except for the capitalization of'none'
.It looks like the problem is that the string "none" is being converted to a Python
None
, and then compared to the available choices, one of which is the string "none".However, in the case of
visibility
, for consistency with CSS, instead ofnone
it would be better to usehidden
, which is already implemented and tested, but not documented.Environment:
The text was updated successfully, but these errors were encountered: