Skip to content

Commit ed14ef7

Browse files
formatting (black + line gaps after multi-line pydocs)
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 3a5a357 commit ed14ef7

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

examples/experimental/sea_connector_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_sea_session():
1818
- DATABRICKS_HTTP_PATH: HTTP path for the SQL endpoint
1919
- DATABRICKS_TOKEN: Personal access token for authentication
2020
"""
21+
2122
server_hostname = os.environ.get("DATABRICKS_SERVER_HOSTNAME")
2223
http_path = os.environ.get("DATABRICKS_HTTP_PATH")
2324
access_token = os.environ.get("DATABRICKS_TOKEN")

src/databricks/sql/backend/sea_backend.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ def __init__(
5555
staging_allowed_local_path: Allowed local paths for staging operations
5656
**kwargs: Additional keyword arguments
5757
"""
58+
5859
logger.debug(
59-
"SEADatabricksClient.__init__(server_hostname=%s, port=%s, http_path=%s)",
60+
"SeaDatabricksClient.__init__(server_hostname=%s, port=%s, http_path=%s)",
6061
server_hostname,
6162
port,
6263
http_path,
@@ -97,6 +98,7 @@ def _extract_warehouse_id(self, http_path: str) -> str:
9798
Raises:
9899
Error: If the warehouse ID cannot be extracted from the path
99100
"""
101+
100102
path_parts = http_path.strip("/").split("/")
101103
warehouse_id = None
102104

@@ -153,8 +155,9 @@ def open_session(
153155
Error: If the session configuration is invalid
154156
OperationalError: If there's an error establishing the session
155157
"""
158+
156159
logger.debug(
157-
"SEADatabricksClient.open_session(session_configuration=%s, catalog=%s, schema=%s)",
160+
"SeaDatabricksClient.open_session(session_configuration=%s, catalog=%s, schema=%s)",
158161
session_configuration,
159162
catalog,
160163
schema,
@@ -189,7 +192,8 @@ def close_session(self, session_id: SessionId) -> None:
189192
ValueError: If the session ID is invalid
190193
OperationalError: If there's an error closing the session
191194
"""
192-
logger.debug("SEADatabricksClient.close_session(session_id=%s)", session_id)
195+
196+
logger.debug("SeaDatabricksClient.close_session(session_id=%s)", session_id)
193197

194198
if session_id.backend_type != BackendType.SEA:
195199
raise ValueError("Not a valid SEA session ID")

src/databricks/sql/backend/thrift_backend.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
)
5454
from databricks.sql.types import SSLOptions
5555
from databricks.sql.backend.databricks_client import DatabricksClient
56-
from databricks.sql.result_set import ResultSet, ThriftResultSet
5756

5857
logger = logging.getLogger(__name__)
5958

@@ -1166,11 +1165,7 @@ def _handle_execute_response(self, resp, cursor):
11661165
resp.directResults and resp.directResults.operationStatus,
11671166
)
11681167

1169-
execute_response = self._results_message_to_execute_response(
1170-
resp, final_operation_state
1171-
)
1172-
execute_response = execute_response._replace(command_id=command_id)
1173-
return execute_response
1168+
return self._results_message_to_execute_response(resp, final_operation_state)
11741169

11751170
def _handle_execute_response_async(self, resp, cursor):
11761171
command_id = CommandId.from_thrift_handle(resp.operationHandle)

src/databricks/sql/backend/utils/http_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(
4040
ssl_options: SSL configuration options
4141
**kwargs: Additional keyword arguments
4242
"""
43+
4344
self.server_hostname = server_hostname
4445
self.port = port
4546
self.http_path = http_path
@@ -103,6 +104,7 @@ def _make_request(
103104
Raises:
104105
RequestError: If the request fails
105106
"""
107+
106108
url = urljoin(self.base_url, path)
107109
headers = {**self.headers, **self._get_auth_headers()}
108110

0 commit comments

Comments
 (0)