Skip to content

Commit 345a9fc

Browse files
reduce diff
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent b8cce65 commit 345a9fc

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/databricks/sql/types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,13 @@ def __reduce__(
229229
self,
230230
) -> Union[str, Tuple[Any, ...]]:
231231
"""Returns a tuple so Python knows how to pickle Row."""
232-
233232
if hasattr(self, "__fields__"):
234233
return (_create_row, (self.__fields__, tuple(self)))
235234
else:
236235
return tuple.__reduce__(self)
237236

238237
def __repr__(self) -> str:
239238
"""Printable representation of Row used in Python REPL."""
240-
241239
if hasattr(self, "__fields__"):
242240
return "Row(%s)" % ", ".join(
243241
"%s=%r" % (k, v) for k, v in zip(self.__fields__, tuple(self))

tests/unit/test_client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ def test_closing_connection_closes_commands(self, mock_thrift_client_class):
105105

106106
# Mock the execute response with controlled state
107107
mock_execute_response = Mock(spec=ExecuteResponse)
108-
109-
mock_execute_response.command_id = Mock(spec=CommandId)
110-
mock_execute_response.status = (
111-
CommandState.SUCCEEDED if not closed else CommandState.CLOSED
112-
)
108+
mock_execute_response.status = initial_state
113109
mock_execute_response.has_been_closed_server_side = closed
114110
mock_execute_response.is_staging_operation = False
115111
mock_execute_response.command_id = Mock(spec=CommandId)

0 commit comments

Comments
 (0)