Skip to content

Commit dd375bb

Browse files
committed
code formatting
Signed-off-by: Sreekanth Vadigi <[email protected]>
1 parent 1563a18 commit dd375bb

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/databricks/sql/client.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ def _check_not_closed(self):
616616
session_id_hex=self.connection.get_session_id_hex(),
617617
)
618618

619-
def _validate_staging_http_response(self, response: requests.Response, operation_name: str = "staging operation") -> None:
619+
def _validate_staging_http_response(
620+
self, response: requests.Response, operation_name: str = "staging operation"
621+
) -> None:
620622

621623
# Check response codes
622624
OK = requests.codes.ok # 200
@@ -634,11 +636,14 @@ def _validate_staging_http_response(self, response: requests.Response, operation
634636
logger.debug(
635637
"Response code %s from server indicates %s was accepted "
636638
"but not yet applied on the server. It's possible this command may fail later.",
637-
ACCEPTED, operation_name
639+
ACCEPTED,
640+
operation_name,
638641
)
639642

640643
def _handle_staging_operation(
641-
self, staging_allowed_local_path: Union[None, str, List[str]], input_stream: Optional[BinaryIO] = None
644+
self,
645+
staging_allowed_local_path: Union[None, str, List[str]],
646+
input_stream: Optional[BinaryIO] = None,
642647
):
643648
"""Fetch the HTTP request instruction from a staging ingestion command
644649
and call the designated handler.
@@ -713,7 +718,8 @@ def _handle_staging_operation(
713718

714719
logger.debug(
715720
"Attempting staging operation indicated by server: %s - %s",
716-
row.operation, getattr(row, 'localFile', '')
721+
row.operation,
722+
getattr(row, "localFile", ""),
717723
)
718724

719725
# TODO: Create a retry loop here to re-attempt if the request times out or fails
@@ -885,9 +891,7 @@ def execute(
885891
)
886892
elif param_approach == ParameterApproach.NATIVE:
887893
normalized_parameters = self._normalize_tparametercollection(parameters)
888-
param_structure = self._determine_parameter_structure(
889-
normalized_parameters
890-
)
894+
param_structure = self._determine_parameter_structure(normalized_parameters)
891895
transformed_operation = transform_paramstyle(
892896
operation, normalized_parameters, param_structure
893897
)
@@ -913,7 +917,7 @@ def execute(
913917
if self.active_result_set and self.active_result_set.is_staging_operation:
914918
self._handle_staging_operation(
915919
staging_allowed_local_path=self.connection.staging_allowed_local_path,
916-
input_stream=input_stream
920+
input_stream=input_stream,
917921
)
918922

919923
return self

0 commit comments

Comments
 (0)