From 823c62bb452bc38805ba2e5caee30521bdbac44d Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 29 Oct 2024 16:18:42 -0400 Subject: [PATCH] add missing undefined typing --- plugins/ui/src/deephaven/ui/components/action_group.py | 8 ++++---- plugins/ui/src/deephaven/ui/components/action_menu.py | 10 +++++----- plugins/ui/src/deephaven/ui/components/button.py | 4 ++-- .../ui/src/deephaven/ui/components/checkbox_group.py | 2 +- plugins/ui/src/deephaven/ui/components/combo_box.py | 8 ++++---- .../ui/src/deephaven/ui/components/contextual_help.py | 4 ++-- plugins/ui/src/deephaven/ui/components/date_field.py | 2 +- plugins/ui/src/deephaven/ui/components/date_picker.py | 2 +- .../src/deephaven/ui/components/date_range_picker.py | 2 +- plugins/ui/src/deephaven/ui/components/flex.py | 2 +- plugins/ui/src/deephaven/ui/components/form.py | 2 +- plugins/ui/src/deephaven/ui/components/grid.py | 4 ++-- .../src/deephaven/ui/components/list_action_group.py | 6 +++--- .../ui/src/deephaven/ui/components/list_action_menu.py | 10 +++++----- plugins/ui/src/deephaven/ui/components/list_view.py | 4 ++-- plugins/ui/src/deephaven/ui/components/panel.py | 10 +++++----- plugins/ui/src/deephaven/ui/components/tabs.py | 8 ++++---- plugins/ui/src/deephaven/ui/components/time_field.py | 2 +- 18 files changed, 45 insertions(+), 45 deletions(-) diff --git a/plugins/ui/src/deephaven/ui/components/action_group.py b/plugins/ui/src/deephaven/ui/components/action_group.py index 81eea2c9c..ef0c4386e 100644 --- a/plugins/ui/src/deephaven/ui/components/action_group.py +++ b/plugins/ui/src/deephaven/ui/components/action_group.py @@ -32,14 +32,14 @@ def action_group( *children: Any, is_emphasized: bool | Undefined = UNDEFINED, - density: ActionGroupDensity | None = "regular", + density: ActionGroupDensity | Undefined = "regular", is_justified: bool | Undefined = UNDEFINED, is_quiet: bool | Undefined = UNDEFINED, static_color: StaticColor | Undefined = UNDEFINED, - overflow_mode: OverflowMode | None = "wrap", - button_label_behavior: ButtonLabelBehavior | None = "show", + overflow_mode: OverflowMode | Undefined = "wrap", + button_label_behavior: ButtonLabelBehavior | Undefined = "show", summary_icon: Element | Undefined = UNDEFINED, - orientation: Orientation | None = "horizontal", + orientation: Orientation | Undefined = "horizontal", disabled_keys: Iterable[str] | Undefined = UNDEFINED, is_disabled: bool | Undefined = UNDEFINED, selection_mode: SelectionMode | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/action_menu.py b/plugins/ui/src/deephaven/ui/components/action_menu.py index e1156b320..bbea7d590 100644 --- a/plugins/ui/src/deephaven/ui/components/action_menu.py +++ b/plugins/ui/src/deephaven/ui/components/action_menu.py @@ -29,11 +29,11 @@ def action_menu( is_quiet: bool | Undefined = UNDEFINED, auto_focus: bool | Undefined = UNDEFINED, disabled_keys: Iterable[Key] | Undefined = UNDEFINED, - align: Alignment | None = "start", - direction: ActionMenuDirection | None = "bottom", - should_flip: bool | None = True, - close_on_select: bool | None = True, - trigger: TriggerType | None = "press", + align: Alignment | Undefined = "start", + direction: ActionMenuDirection | Undefined = "bottom", + should_flip: bool | Undefined = True, + close_on_select: bool | Undefined = True, + trigger: TriggerType | Undefined = "press", is_open: bool | Undefined = UNDEFINED, default_open: bool | Undefined = UNDEFINED, on_action: Callable[[ActionKey], None] | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/button.py b/plugins/ui/src/deephaven/ui/components/button.py index c15e549a1..5f23557da 100644 --- a/plugins/ui/src/deephaven/ui/components/button.py +++ b/plugins/ui/src/deephaven/ui/components/button.py @@ -28,8 +28,8 @@ def button( *children: Any, - variant: ButtonVariant | None = "accent", - style: ButtonStyle | None = "fill", + variant: ButtonVariant | Undefined = "accent", + style: ButtonStyle | Undefined = "fill", static_color: StaticColor | Undefined = UNDEFINED, is_pending: bool | Undefined = UNDEFINED, type: ButtonType = "button", diff --git a/plugins/ui/src/deephaven/ui/components/checkbox_group.py b/plugins/ui/src/deephaven/ui/components/checkbox_group.py index c7c38d17a..2c7920a30 100644 --- a/plugins/ui/src/deephaven/ui/components/checkbox_group.py +++ b/plugins/ui/src/deephaven/ui/components/checkbox_group.py @@ -32,7 +32,7 @@ def checkbox_group( error_message: Any | Undefined = UNDEFINED, is_required: bool | Undefined = UNDEFINED, is_invalid: bool | Undefined = UNDEFINED, - validation_behavior: ValidationBehavior | None = "aria", + validation_behavior: ValidationBehavior | Undefined = "aria", label_position: str | Undefined = UNDEFINED, label_align: str | Undefined = UNDEFINED, necessity_indicator: str | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/combo_box.py b/plugins/ui/src/deephaven/ui/components/combo_box.py index d17f35742..38e5c9b28 100644 --- a/plugins/ui/src/deephaven/ui/components/combo_box.py +++ b/plugins/ui/src/deephaven/ui/components/combo_box.py @@ -45,14 +45,14 @@ def combo_box( *children: Item | SectionElement | Table | PartitionedTable | ItemTableSource, - menu_trigger: MenuTriggerAction | None = "input", + menu_trigger: MenuTriggerAction | Undefined = "input", is_quiet: bool | Undefined = UNDEFINED, - align: Align | None = "end", - direction: MenuDirection | None = "bottom", + align: Align | Undefined = "end", + direction: MenuDirection | Undefined = "bottom", loading_state: LoadingState | Undefined = UNDEFINED, should_flip: bool = True, menu_width: DimensionValue | Undefined = UNDEFINED, - form_value: FormValue | None = "text", + form_value: FormValue | Undefined = "text", should_focus_wrap: bool | Undefined = UNDEFINED, input_value: str | Undefined = UNDEFINED, default_input_value: str | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/contextual_help.py b/plugins/ui/src/deephaven/ui/components/contextual_help.py index 00e2b7e40..7a1be9e4f 100644 --- a/plugins/ui/src/deephaven/ui/components/contextual_help.py +++ b/plugins/ui/src/deephaven/ui/components/contextual_help.py @@ -22,8 +22,8 @@ def contextual_help( content: Any, footer: Any = None, *, - variant: ContextualHelperVariant | None = "help", - placement: Placement | None = "bottom start", + variant: ContextualHelperVariant | Undefined = "help", + placement: Placement | Undefined = "bottom start", is_open: bool | Undefined = UNDEFINED, default_open: bool | Undefined = UNDEFINED, container_padding: float | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/date_field.py b/plugins/ui/src/deephaven/ui/components/date_field.py index 90f592364..d33b6cee1 100644 --- a/plugins/ui/src/deephaven/ui/components/date_field.py +++ b/plugins/ui/src/deephaven/ui/components/date_field.py @@ -75,7 +75,7 @@ def _convert_date_field_props( @make_component def date_field( - placeholder_value: Date | None = dh_now(), + placeholder_value: Date | Undefined = dh_now(), value: Date | Undefined = UNDEFINED, default_value: Date | Undefined = UNDEFINED, min_value: Date | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/date_picker.py b/plugins/ui/src/deephaven/ui/components/date_picker.py index ca5f5e5b7..5e31675df 100644 --- a/plugins/ui/src/deephaven/ui/components/date_picker.py +++ b/plugins/ui/src/deephaven/ui/components/date_picker.py @@ -79,7 +79,7 @@ def _convert_date_picker_props( @make_component def date_picker( - placeholder_value: Date | None = dh_now(), + placeholder_value: Date | Undefined = dh_now(), value: Date | Undefined = UNDEFINED, default_value: Date | Undefined = UNDEFINED, min_value: Date | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/date_range_picker.py b/plugins/ui/src/deephaven/ui/components/date_range_picker.py index 99b33375e..567949c9d 100644 --- a/plugins/ui/src/deephaven/ui/components/date_range_picker.py +++ b/plugins/ui/src/deephaven/ui/components/date_range_picker.py @@ -77,7 +77,7 @@ def _convert_date_range_picker_props( @make_component def date_range_picker( - placeholder_value: Date | None = dh_now(), + placeholder_value: Date | Undefined = dh_now(), value: DateRange | Undefined = UNDEFINED, default_value: DateRange | Undefined = UNDEFINED, min_value: Date | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/flex.py b/plugins/ui/src/deephaven/ui/components/flex.py index 4fc783f8b..49fbc12b6 100644 --- a/plugins/ui/src/deephaven/ui/components/flex.py +++ b/plugins/ui/src/deephaven/ui/components/flex.py @@ -25,7 +25,7 @@ def flex( justify_content: JustifyContent | Undefined = UNDEFINED, align_content: AlignContent | Undefined = UNDEFINED, align_items: AlignItems | Undefined = UNDEFINED, - gap: DimensionValue | None = "size-100", + gap: DimensionValue | Undefined = "size-100", column_gap: DimensionValue | Undefined = UNDEFINED, row_gap: DimensionValue | Undefined = UNDEFINED, flex: LayoutFlex = "auto", diff --git a/plugins/ui/src/deephaven/ui/components/form.py b/plugins/ui/src/deephaven/ui/components/form.py index b3c8f22ec..63b685609 100644 --- a/plugins/ui/src/deephaven/ui/components/form.py +++ b/plugins/ui/src/deephaven/ui/components/form.py @@ -31,7 +31,7 @@ def form( is_required: bool | Undefined = UNDEFINED, is_read_only: bool | Undefined = UNDEFINED, validation_state: ValidationState | Undefined = UNDEFINED, - validation_behavior: ValidationBehavior | None = "aria", + validation_behavior: ValidationBehavior | Undefined = "aria", validation_errors: Dict[str, str | List[str]] | Undefined = UNDEFINED, action: str | Undefined = UNDEFINED, enc_type: EncodingType | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/grid.py b/plugins/ui/src/deephaven/ui/components/grid.py index 9c50ef39e..99a8c1c25 100644 --- a/plugins/ui/src/deephaven/ui/components/grid.py +++ b/plugins/ui/src/deephaven/ui/components/grid.py @@ -31,10 +31,10 @@ def grid( justify_content: JustifyContent = "stretch", align_content: AlignContent = "start", align_items: AlignItems = "stretch", - gap: DimensionValue | None = "size-100", + gap: DimensionValue | Undefined = "size-100", column_gap: DimensionValue | Undefined = UNDEFINED, row_gap: DimensionValue | Undefined = UNDEFINED, - flex: LayoutFlex | None = "auto", + flex: LayoutFlex | Undefined = "auto", flex_grow: float | Undefined = UNDEFINED, flex_shrink: float | Undefined = UNDEFINED, flex_basis: DimensionValue | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/list_action_group.py b/plugins/ui/src/deephaven/ui/components/list_action_group.py index 72dc30bea..c9f49fb05 100644 --- a/plugins/ui/src/deephaven/ui/components/list_action_group.py +++ b/plugins/ui/src/deephaven/ui/components/list_action_group.py @@ -38,14 +38,14 @@ def list_action_group( on_action: Callable[[ActionKey, Key], None] | Undefined = UNDEFINED, on_change: Callable[[Selection, Key], None] | Undefined = UNDEFINED, is_emphasized: bool | Undefined = UNDEFINED, - density: ActionGroupDensity | None = "regular", + density: ActionGroupDensity | Undefined = "regular", is_justified: bool | Undefined = UNDEFINED, is_quiet: bool | Undefined = UNDEFINED, static_color: StaticColor | Undefined = UNDEFINED, - overflow_mode: OverflowMode | None = "wrap", + overflow_mode: OverflowMode | Undefined = "wrap", button_label_behavior: ButtonLabelBehavior | None = "show", summary_icon: Element | Undefined = UNDEFINED, - orientation: Orientation | None = "horizontal", + orientation: Orientation | Undefined = "horizontal", disabled_keys: Iterable[str] | Undefined = UNDEFINED, is_disabled: bool | Undefined = UNDEFINED, selection_mode: SelectionMode | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/list_action_menu.py b/plugins/ui/src/deephaven/ui/components/list_action_menu.py index b68175959..e9f69ebf5 100644 --- a/plugins/ui/src/deephaven/ui/components/list_action_menu.py +++ b/plugins/ui/src/deephaven/ui/components/list_action_menu.py @@ -31,11 +31,11 @@ def list_action_menu( is_quiet: bool | Undefined = UNDEFINED, auto_focus: bool | Undefined = UNDEFINED, disabled_keys: Iterable[Key] | Undefined = UNDEFINED, - align: Alignment | None = "start", - direction: ActionMenuDirection | None = "bottom", - should_flip: bool | None = True, - close_on_select: bool | None = True, - trigger: TriggerType | None = "press", + align: Alignment | Undefined = "start", + direction: ActionMenuDirection | Undefined = "bottom", + should_flip: bool | Undefined = True, + close_on_select: bool | Undefined = True, + trigger: TriggerType | Undefined = "press", is_open: bool | Undefined = UNDEFINED, default_open: bool | Undefined = UNDEFINED, flex: LayoutFlex | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/list_view.py b/plugins/ui/src/deephaven/ui/components/list_view.py index d2cd0e180..8a53299ac 100644 --- a/plugins/ui/src/deephaven/ui/components/list_view.py +++ b/plugins/ui/src/deephaven/ui/components/list_view.py @@ -43,14 +43,14 @@ def list_view( *children: Item | Table | ItemTableSource, - density: ListViewDensity | None = "COMPACT", + density: ListViewDensity | Undefined = "COMPACT", is_quiet: bool | Undefined = UNDEFINED, loading_state: LoadingState | Undefined = UNDEFINED, overflow_mode: ListViewOverflowMode = "truncate", render_empty_state: Element | Undefined = UNDEFINED, disabled_behavior: DisabledBehavior | Undefined = UNDEFINED, disabled_keys: Selection | Undefined = UNDEFINED, - selection_mode: SelectionMode | None = "MULTIPLE", + selection_mode: SelectionMode | Undefined = "MULTIPLE", disallow_empty_selection: bool | Undefined = UNDEFINED, selected_keys: Selection | Undefined = UNDEFINED, default_selected_keys: Selection | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/panel.py b/plugins/ui/src/deephaven/ui/components/panel.py index 19aed8015..d37b9bded 100644 --- a/plugins/ui/src/deephaven/ui/components/panel.py +++ b/plugins/ui/src/deephaven/ui/components/panel.py @@ -19,16 +19,16 @@ def panel( *children: Any, title: str | Undefined = UNDEFINED, - direction: Direction | None = "column", + direction: Direction | Undefined = "column", wrap: Wrap | Undefined = UNDEFINED, justify_content: JustifyContent | Undefined = UNDEFINED, align_content: AlignContent | Undefined = UNDEFINED, - align_items: AlignItems | None = "start", - gap: DimensionValue | None = "size-100", + align_items: AlignItems | Undefined = "start", + gap: DimensionValue | Undefined = "size-100", column_gap: DimensionValue | Undefined = UNDEFINED, row_gap: DimensionValue | Undefined = UNDEFINED, - overflow: Overflow | None = "auto", - padding: DimensionValue | None = "size-100", + overflow: Overflow | Undefined = "auto", + padding: DimensionValue | Undefined = "size-100", padding_top: DimensionValue | Undefined = UNDEFINED, padding_bottom: DimensionValue | Undefined = UNDEFINED, padding_start: DimensionValue | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/tabs.py b/plugins/ui/src/deephaven/ui/components/tabs.py index a2cc9144a..643a9602f 100644 --- a/plugins/ui/src/deephaven/ui/components/tabs.py +++ b/plugins/ui/src/deephaven/ui/components/tabs.py @@ -23,16 +23,16 @@ def tabs( is_disabled: bool | Undefined = UNDEFINED, is_quiet: bool | Undefined = UNDEFINED, is_emphasized: bool | Undefined = UNDEFINED, - density: TabDensity | None = "compact", - keyboard_activation: KeyboardActivationType | None = "automatic", - orientation: Orientation | None = "horizontal", + density: TabDensity | Undefined = "compact", + keyboard_activation: KeyboardActivationType | Undefined = "automatic", + orientation: Orientation | Undefined = "horizontal", disallow_empty_selection: bool | Undefined = UNDEFINED, selected_key: Key | Undefined = UNDEFINED, default_selected_key: Key | Undefined = UNDEFINED, on_selection_change: Callable[[Key], None] | Undefined = UNDEFINED, on_change: Callable[[Key], None] | Undefined = UNDEFINED, flex: LayoutFlex | Undefined = UNDEFINED, - flex_grow: float | None = 1, + flex_grow: float | Undefined = 1, flex_shrink: float | Undefined = UNDEFINED, flex_basis: DimensionValue | Undefined = UNDEFINED, align_self: AlignSelf | Undefined = UNDEFINED, diff --git a/plugins/ui/src/deephaven/ui/components/time_field.py b/plugins/ui/src/deephaven/ui/components/time_field.py index e340a933e..e61082c07 100644 --- a/plugins/ui/src/deephaven/ui/components/time_field.py +++ b/plugins/ui/src/deephaven/ui/components/time_field.py @@ -76,7 +76,7 @@ def time_field( default_value: Time | Undefined = UNDEFINED, min_value: Time | Undefined = UNDEFINED, max_value: Time | Undefined = UNDEFINED, - granularity: TimeGranularity | None = "SECOND", + granularity: TimeGranularity | Undefined = "SECOND", hour_cycle: HourCycle | Undefined = UNDEFINED, hide_time_zone: bool = False, should_force_leading_zeros: bool | Undefined = UNDEFINED,