Clarify a comment

"optional" is ambiguous, between optional arguments (i.e. parameters with a default value), and a union with `None` (i.e. `Optional`, or `| None`)
This commit is contained in:
Isaiah Odhner 2023-07-14 22:45:07 -04:00
parent cbcf22c4d7
commit 4fc5a6e8e5

View File

@ -647,7 +647,7 @@ class MessageBox(DialogWindow):
*children: Widget,
message: Widget | str,
button_types: str = "ok",
icon_widget: Widget | None, # not optional because I'm more likely to forget to pass it than to want no icon
icon_widget: Widget | None, # can be None but must be specified, because I'm more likely to forget to pass it than to want no icon
handle_button: Callable[[Button], None],
error: Exception | None = None,
**kwargs: Any,