Skip to content

Commit

Permalink
Fix up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mofojed committed Mar 8, 2024
1 parent 27e9e1c commit 86fbbc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugins/ui/src/deephaven/ui/elements/UITable.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _with_prop(self, key: str, value: Any) -> "UITable":
A new UITable with the passed in prop added to the existing props
"""
logger.debug("_with_prop(%s, %s)", key, value)
return UITable(**self._props, key=value)
return UITable(**{**self._props, key: value})

def _with_appendable_prop(self, key: str, value: Any) -> "UITable":
"""
Expand All @@ -173,7 +173,7 @@ def _with_appendable_prop(self, key: str, value: Any) -> "UITable":

value = value if isinstance(value, list) else [value]

return UITable(**self._props, key=existing + value)
return UITable(**{**self._props, key: existing + value})

def _with_dict_prop(self, key: str, value: dict[str, Any]) -> "UITable":
"""
Expand All @@ -191,7 +191,7 @@ def _with_dict_prop(self, key: str, value: dict[str, Any]) -> "UITable":
"""
logger.debug("_with_dict_prop(%s, %s)", key, value)
existing = self._props.get(key, {})
return UITable(**self._props, key={**existing, **value})
return UITable(**{**self._props, key: {**existing, **value}}) # type: ignore

def render(self, context: RenderContext) -> dict[str, Any]:
logger.debug("Returning props %s", self._props)
Expand Down
2 changes: 1 addition & 1 deletion plugins/ui/test/deephaven/ui/test_ui_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_on_row_double_press(self):
def callback(row):
pass

t = ui.table(self.source).on_row_double_press(callback)
t = ui.table(self.source, on_row_double_press=callback)

self.expect_render(
t,
Expand Down

0 comments on commit 86fbbc7

Please sign in to comment.