Decide how to deal with empty string vs None
When generating a magicgui for skimage.filters.sato, because we don't yet try to parse docstrings for "choices" in a dropdown menu, the "mode" parameter is rendered as a plain text edit.
If the user doesn't enter anything, then it gets delivered to the function as the empty string instead of None, and skimage raises RuntimeError: boundary mode not supported.
We could have the standard setter convert the empty string to None ... but then the empty string is inaccessible as a value...
How do you know that it should be a string in this case? Why wouldn't it fall back to literal_eval?
Oh that’s a good point. The reason is that the current behavior for a non-annotated argument like mode was to already use a LineEdit (but not the literal eval one). Whereas the literal eval was enabled when we DO know the type (perhaps based on the default value), but we don’t have a widget for it. (Like tuple at the moment). But maybe you’re right, we should make it a literal eval field
"nullable" ValueWidgets have been doing ok i think. while there might still be something to consider here, it hasn't come up in a long time. closing