Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added src/databricks/py.typed
Empty file.
8 changes: 7 additions & 1 deletion src/databricks/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

import re

from typing import TYPE_CHECKING

if TYPE_CHECKING:
# Use this import purely for type annotations, a la https://mypy.readthedocs.io/en/latest/runtime_troubles.html#import-cycles
from .client import Connection


class RedactUrlQueryParamsFilter(logging.Filter):
pattern = re.compile(r"(\?|&)([\w-]+)=([^&]+)")
Expand Down Expand Up @@ -78,7 +84,7 @@ def TimestampFromTicks(ticks):
return Timestamp(*time.localtime(ticks)[:6])


def connect(server_hostname, http_path, access_token=None, **kwargs):
def connect(server_hostname, http_path, access_token=None, **kwargs) -> "Connection":
from .client import Connection

return Connection(server_hostname, http_path, access_token, **kwargs)