Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Per @chipkent.

Co-authored-by: Chip Kent <5250374+chipkent@users.noreply.github.com>
  • Loading branch information
arman-ddl and chipkent authored Mar 15, 2024
1 parent 8bb8664 commit ae90b46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py/server/deephaven/jcompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _j_array_to_series(dtype: DType, j_array: jpy.JType, conv_null: bool) -> pd.


class SafeCloseable(JObjectWrapper):
"""A context manager wrapper of Java SafeCloseable to emulate Java try-with-resources."""
"""A context manager wrapper to allow Java SafeCloseable to be used in with statements."""

j_object_type = jpy.get_type("io.deephaven.util.SafeCloseable")

Expand Down
2 changes: 1 addition & 1 deletion py/server/tests/test_jcompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def int_to_str(v: int) -> str:
def test_safe_closeable(self):
safe_closeable = SafeCloseable(_JSharedContext.makeSharedContext())
with safe_closeable:
pass
self.assertEqual(safe_closeable.closed, False)
self.assertEqual(safe_closeable.closed, True)


Expand Down

0 comments on commit ae90b46

Please sign in to comment.