From dbcfef320bebc7dd10822e45f905bedfac2c59dd Mon Sep 17 00:00:00 2001 From: Akshat Jawne <69530774+AkshatJawne@users.noreply.github.com> Date: Mon, 19 Aug 2024 07:56:05 -0600 Subject: [PATCH] fix: autodoc failures hotfix (#748) Closes #747 --- plugins/ui/src/deephaven/ui/components/checkbox.py | 2 +- plugins/ui/src/deephaven/ui/components/content.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/fragment.py | 2 +- plugins/ui/src/deephaven/ui/components/grid.py | 2 +- plugins/ui/src/deephaven/ui/components/heading.py | 2 +- plugins/ui/src/deephaven/ui/components/panel.py | 3 ++- plugins/ui/src/deephaven/ui/components/picker.py | 1 + plugins/ui/src/deephaven/ui/components/row.py | 2 +- plugins/ui/src/deephaven/ui/components/stack.py | 2 +- plugins/ui/src/deephaven/ui/components/text.py | 2 +- plugins/ui/src/deephaven/ui/components/view.py | 6 +++++- 13 files changed, 18 insertions(+), 12 deletions(-) diff --git a/plugins/ui/src/deephaven/ui/components/checkbox.py b/plugins/ui/src/deephaven/ui/components/checkbox.py index 33b77c62d..d8bb1029d 100644 --- a/plugins/ui/src/deephaven/ui/components/checkbox.py +++ b/plugins/ui/src/deephaven/ui/components/checkbox.py @@ -89,7 +89,7 @@ def checkbox( Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected. Args: - children: The checkbox label. + *children: The checkbox label. is_emphasized: This prop sets the emphasized style which provides visual prominence. is_indeterminate: Indeterminism is presentational only. The indeterminate visual representation remains regardless of user interaction. default_selected: Whether the element should be selected (uncontrolled). diff --git a/plugins/ui/src/deephaven/ui/components/content.py b/plugins/ui/src/deephaven/ui/components/content.py index 5db0f1062..e496b2997 100644 --- a/plugins/ui/src/deephaven/ui/components/content.py +++ b/plugins/ui/src/deephaven/ui/components/content.py @@ -59,7 +59,7 @@ def content( Content represents the primary content within a Spectrum container. Args: - children: The content to render within the container. + *children: The content to render within the container. flex: When used in a flex layout, specifies how the element will grow or shrink to fit the space available. flex_grow: When used in a flex layout, specifies how the element will grow to fit the space available. flex_shrink: When used in a flex layout, specifies how the element will shrink to fit the space available. diff --git a/plugins/ui/src/deephaven/ui/components/flex.py b/plugins/ui/src/deephaven/ui/components/flex.py index c8388a40a..a015bc51d 100644 --- a/plugins/ui/src/deephaven/ui/components/flex.py +++ b/plugins/ui/src/deephaven/ui/components/flex.py @@ -29,7 +29,7 @@ def flex( Base Flex component for laying out children in a flexbox. Args: - children: Elements to render in the flexbox. + *children: Elements to render in the flexbox. flex: The flex property of the flexbox. direction: The direction in which to layout children. wrap: Whether children should wrap when they exceed the panel's width. diff --git a/plugins/ui/src/deephaven/ui/components/form.py b/plugins/ui/src/deephaven/ui/components/form.py index 151fcdbfc..c298013ef 100644 --- a/plugins/ui/src/deephaven/ui/components/form.py +++ b/plugins/ui/src/deephaven/ui/components/form.py @@ -93,7 +93,7 @@ def form( Forms allow users to enter data that can be submitted while providing alignment and styling for form fields Args: - children: The content to render within the container. + *children: The content to render within the container. is_quiet: Whether the form should be quiet. is_emphasized: Whether the form should be emphasized. is_disabled: Whether the form should be disabled. diff --git a/plugins/ui/src/deephaven/ui/components/fragment.py b/plugins/ui/src/deephaven/ui/components/fragment.py index a39135e76..dd963d2fc 100644 --- a/plugins/ui/src/deephaven/ui/components/fragment.py +++ b/plugins/ui/src/deephaven/ui/components/fragment.py @@ -10,6 +10,6 @@ def fragment(*children: Any): Used to group elements together without a wrapper node. Args: - children: The children in the fragment. + *children: The children in the fragment. """ return component_element("Fragment", children=children) diff --git a/plugins/ui/src/deephaven/ui/components/grid.py b/plugins/ui/src/deephaven/ui/components/grid.py index 32a43ea94..86b4480d1 100644 --- a/plugins/ui/src/deephaven/ui/components/grid.py +++ b/plugins/ui/src/deephaven/ui/components/grid.py @@ -77,7 +77,7 @@ def grid( A layout container using CSS grid. Supports Spectrum dimensions as values to ensure consistent and adaptive sizing and spacing. Args: - children: The content to render within the container. + *children: The content to render within the container. areas: The named grid areas to use for the grid. rows: The row sizes for the grid. columns: The column sizes for the grid. diff --git a/plugins/ui/src/deephaven/ui/components/heading.py b/plugins/ui/src/deephaven/ui/components/heading.py index 9dc3052e9..1e1e9f3e0 100644 --- a/plugins/ui/src/deephaven/ui/components/heading.py +++ b/plugins/ui/src/deephaven/ui/components/heading.py @@ -63,7 +63,7 @@ def heading( A layout container using CSS grid. Supports Spectrum dimensions as values to ensure consistent and adaptive sizing and spacing. Args: - children: The content to render within the container. + *children: The content to render within the container. level: Sets heading level, h1 through h6. Defaults to 3. color: The color of the text. flex: When used in a flex layout, specifies how the element will grow or shrink to fit the space available. diff --git a/plugins/ui/src/deephaven/ui/components/panel.py b/plugins/ui/src/deephaven/ui/components/panel.py index 58fbf2d7c..db538aa1b 100644 --- a/plugins/ui/src/deephaven/ui/components/panel.py +++ b/plugins/ui/src/deephaven/ui/components/panel.py @@ -37,7 +37,7 @@ def panel( A panel is a container that can be used to group elements. Args: - children: Elements to render in the panel. + *children: Elements to render in the panel. title: Title of the panel. direction: The direction in which to layout children. wrap: Whether children should wrap when they exceed the panel's width. @@ -54,6 +54,7 @@ def panel( padding_end: The padding to apply after the element. padding_x: The padding to apply to the left and right of the element. padding_y: The padding to apply to the top and bottom of the element. + """ children, props = create_props(locals()) diff --git a/plugins/ui/src/deephaven/ui/components/picker.py b/plugins/ui/src/deephaven/ui/components/picker.py index e59692852..7fa0c155e 100644 --- a/plugins/ui/src/deephaven/ui/components/picker.py +++ b/plugins/ui/src/deephaven/ui/components/picker.py @@ -220,6 +220,7 @@ def picker( Returns: The rendered Picker. """ + children, props = create_props(locals()) children, props = unpack_item_table_source(children, props, SUPPORTED_SOURCE_ARGS) diff --git a/plugins/ui/src/deephaven/ui/components/row.py b/plugins/ui/src/deephaven/ui/components/row.py index 6b1cd8c60..33f7bfd1b 100644 --- a/plugins/ui/src/deephaven/ui/components/row.py +++ b/plugins/ui/src/deephaven/ui/components/row.py @@ -10,7 +10,7 @@ def row(*children: Any, height: float | None = None, **kwargs: Any): Each element will be placed to the right of its prior sibling. Args: - children: Elements to render in the row. + *children: Elements to render in the row. height: The percent height of the row relative to other children of its parent. If not provided, the row will be sized automatically. """ return component_element("Row", *children, height=height, **kwargs) diff --git a/plugins/ui/src/deephaven/ui/components/stack.py b/plugins/ui/src/deephaven/ui/components/stack.py index d3e42cc75..b3e2f3779 100644 --- a/plugins/ui/src/deephaven/ui/components/stack.py +++ b/plugins/ui/src/deephaven/ui/components/stack.py @@ -16,7 +16,7 @@ def stack( Each element will get a tab and only one element can be visible at a time. Args: - children: Elements to render in the row. + *children: Elements to render in the row. height: The percent height of the stack relative to other children of its parent. If not provided, the stack will be sized automatically. width: The percent width of the stack relative to other children of its parent. If not provided, the stack will be sized automatically. """ diff --git a/plugins/ui/src/deephaven/ui/components/text.py b/plugins/ui/src/deephaven/ui/components/text.py index ac737fd0e..15740a9e6 100644 --- a/plugins/ui/src/deephaven/ui/components/text.py +++ b/plugins/ui/src/deephaven/ui/components/text.py @@ -61,7 +61,7 @@ def text( Text represents text with no specific semantic meaning. Args: - children: Text content. + *children: Text content. color: The color of the text. flex: When used in a flex layout, specifies how the element will grow or shrink to fit the space available. flex_grow: When used in a flex layout, specifies how the element will grow to fit the space available. diff --git a/plugins/ui/src/deephaven/ui/components/view.py b/plugins/ui/src/deephaven/ui/components/view.py index 4fe230620..1331ce1e6 100644 --- a/plugins/ui/src/deephaven/ui/components/view.py +++ b/plugins/ui/src/deephaven/ui/components/view.py @@ -91,7 +91,7 @@ def view( View is a general purpose container with no specific semantics that can be used for custom styling purposes. It supports Spectrum style props to ensure consistency with other Spectrum components. Args: - children: The content to render within the container. + *children: The content to render within the container. element_type: The type of element to render. flex: When used in a flex layout, specifies how the element will grow or shrink to fit the space available. flex_grow: When used in a flex layout, specifies how the element will grow to fit the space available. @@ -162,7 +162,11 @@ def view( id: The unique identifier of the element. UNSAFE_class_name: A CSS class to apply to the element. UNSAFE_style: A CSS style to apply to the element. + + Returns: + The rendered view. """ + return component_element( "View", children=children,