Skip to content

Commit d98ca45

Browse files
cathleenyIsaac
andcommitted
fix(kernel): type _kernel_host_and_path http_path as str
The helper returned Optional[str] for the resolved path, but KernelDatabricksClient takes a str, so mypy fails in check-types on every supported Python. Session.__init__ already types http_path as str, so this is an annotation-only change with no runtime effect. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
1 parent db9a0fe commit d98ca45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/databricks/sql/session.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def _uri_host_and_path(uri: str) -> Tuple[str, str]:
113113

114114

115115
def _kernel_host_and_path(
116-
server_hostname: str, http_path: Optional[str], kwargs: dict
117-
) -> Tuple[str, Optional[str]]:
116+
server_hostname: str, http_path: str, kwargs: dict
117+
) -> Tuple[str, str]:
118118
"""Resolve the kernel ``(host, http_path)``. ``_connection_uri`` replaces both and wins over
119119
``_port``; ``_port`` folds into the host as ``host:port`` (default 443 adds nothing).
120120
"""

0 commit comments

Comments
 (0)