@@ -127,7 +127,9 @@ def test_hive_schema_to_arrow_schema_preserves_column_names(self):
127127 ]
128128
129129 t_table_schema = ttypes .TTableSchema (columns )
130- arrow_schema = ThriftDatabricksClient ._hive_schema_to_arrow_schema (t_table_schema )
130+ arrow_schema = ThriftDatabricksClient ._hive_schema_to_arrow_schema (
131+ t_table_schema
132+ )
131133
132134 self .assertEqual (arrow_schema .field (0 ).name , "column 1" )
133135 self .assertEqual (arrow_schema .field (1 ).name , "column 2" )
@@ -1147,7 +1149,9 @@ def test_execute_statement_calls_client_and_handle_execute_response(
11471149 thrift_backend ._handle_execute_response = Mock ()
11481150 cursor_mock = Mock ()
11491151
1150- result = thrift_backend .execute_command ("foo" , Mock (), 100 , 200 , Mock (), cursor_mock )
1152+ result = thrift_backend .execute_command (
1153+ "foo" , Mock (), 100 , 200 , Mock (), cursor_mock
1154+ )
11511155 # Verify the result is a ResultSet
11521156 self .assertIsInstance (result , ResultSet )
11531157
@@ -1419,8 +1423,12 @@ def test_create_arrow_table_raises_error_for_unsupported_type(self):
14191423 with self .assertRaises (OperationalError ):
14201424 thrift_backend ._create_arrow_table (t_row_set , Mock (), None , Mock ())
14211425
1422- @patch ("databricks.sql.backend.thrift_backend.convert_arrow_based_set_to_arrow_table" )
1423- @patch ("databricks.sql.backend.thrift_backend.convert_column_based_set_to_arrow_table" )
1426+ @patch (
1427+ "databricks.sql.backend.thrift_backend.convert_arrow_based_set_to_arrow_table"
1428+ )
1429+ @patch (
1430+ "databricks.sql.backend.thrift_backend.convert_column_based_set_to_arrow_table"
1431+ )
14241432 def test_create_arrow_table_calls_correct_conversion_method (
14251433 self , convert_col_mock , convert_arrow_mock
14261434 ):
@@ -1643,7 +1651,8 @@ def test_handle_execute_response_sets_active_op_handle(self):
16431651 "databricks.sql.thrift_api.TCLIService.TCLIService.Client.GetOperationStatus"
16441652 )
16451653 @patch (
1646- "databricks.sql.backend.thrift_backend._retry_policy" , new_callable = retry_policy_factory
1654+ "databricks.sql.backend.thrift_backend._retry_policy" ,
1655+ new_callable = retry_policy_factory ,
16471656 )
16481657 def test_make_request_will_retry_GetOperationStatus (
16491658 self , mock_retry_policy , mock_GetOperationStatus , t_transport_class
@@ -1718,7 +1727,8 @@ def test_make_request_will_retry_GetOperationStatus(
17181727 "databricks.sql.thrift_api.TCLIService.TCLIService.Client.GetOperationStatus"
17191728 )
17201729 @patch (
1721- "databricks.sql.backend.thrift_backend._retry_policy" , new_callable = retry_policy_factory
1730+ "databricks.sql.backend.thrift_backend._retry_policy" ,
1731+ new_callable = retry_policy_factory ,
17221732 )
17231733 def test_make_request_will_retry_GetOperationStatus_for_http_error (
17241734 self , mock_retry_policy , mock_gos
@@ -1795,7 +1805,8 @@ def test_make_request_wont_retry_if_error_code_not_429_or_503(
17951805
17961806 @patch ("databricks.sql.auth.thrift_http_client.THttpClient" )
17971807 @patch (
1798- "databricks.sql.backend.thrift_backend._retry_policy" , new_callable = retry_policy_factory
1808+ "databricks.sql.backend.thrift_backend._retry_policy" ,
1809+ new_callable = retry_policy_factory ,
17991810 )
18001811 def test_make_request_will_retry_stop_after_attempts_count_if_retryable (
18011812 self , mock_retry_policy , t_transport_class
@@ -1975,7 +1986,12 @@ def test_retry_args_passthrough(self, mock_http_client):
19751986 @patch ("thrift.transport.THttpClient.THttpClient" )
19761987 def test_retry_args_bounding (self , mock_http_client ):
19771988 retry_delay_test_args_and_expected_values = {}
1978- for k , (_ , _ , min , max ) in databricks .sql .backend .thrift_backend ._retry_policy .items ():
1989+ for k , (
1990+ _ ,
1991+ _ ,
1992+ min ,
1993+ max ,
1994+ ) in databricks .sql .backend .thrift_backend ._retry_policy .items ():
19791995 retry_delay_test_args_and_expected_values [k ] = (
19801996 (min - 1 , min ),
19811997 (max + 1 , max ),
@@ -2171,7 +2187,9 @@ def test_protocol_v3_fails_if_initial_namespace_set(self, tcli_client_class):
21712187 )
21722188
21732189 @patch ("databricks.sql.backend.thrift_backend.TCLIService.Client" , autospec = True )
2174- @patch ("databricks.sql.backend.thrift_backend.ThriftDatabricksClient._handle_execute_response" )
2190+ @patch (
2191+ "databricks.sql.backend.thrift_backend.ThriftDatabricksClient._handle_execute_response"
2192+ )
21752193 def test_execute_command_sets_complex_type_fields_correctly (
21762194 self , mock_handle_execute_response , tcli_service_class
21772195 ):
0 commit comments