Skip to content

Commit 6158a75

Browse files
committed
Fix linting in src for black
1 parent 2a58e9b commit 6158a75

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

src/databricks/sql/auth/auth.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ def get_python_sql_connector_auth_provider(hostname: str, **kwargs):
120120
tls_client_cert_file=kwargs.get("_tls_client_cert_file"),
121121
oauth_scopes=PYSQL_OAUTH_SCOPES,
122122
oauth_client_id=kwargs.get("oauth_client_id") or client_id,
123-
oauth_redirect_port_range=[kwargs["oauth_redirect_port"]]
124-
if kwargs.get("oauth_client_id") and kwargs.get("oauth_redirect_port")
125-
else redirect_port_range,
123+
oauth_redirect_port_range=(
124+
[kwargs["oauth_redirect_port"]]
125+
if kwargs.get("oauth_client_id") and kwargs.get("oauth_redirect_port")
126+
else redirect_port_range
127+
),
126128
oauth_persistence=kwargs.get("experimental_oauth_persistence"),
127129
credentials_provider=kwargs.get("credentials_provider"),
128130
)

src/databricks/sql/auth/authenticators.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ class CredentialsProvider(abc.ABC):
2525
for authenticating requests to Databricks REST APIs"""
2626

2727
@abc.abstractmethod
28-
def auth_type(self) -> str:
29-
...
28+
def auth_type(self) -> str: ...
3029

3130
@abc.abstractmethod
32-
def __call__(self, *args, **kwargs) -> HeaderFactory:
33-
...
31+
def __call__(self, *args, **kwargs) -> HeaderFactory: ...
3432

3533

3634
# Private API: this is an evolving interface and it will change in the future.

src/databricks/sql/auth/thrift_http_client.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ def open(self):
115115
pool_class = HTTPSConnectionPool
116116
_pool_kwargs.update(
117117
{
118-
"cert_reqs": ssl.CERT_REQUIRED
119-
if self._ssl_options.tls_verify
120-
else ssl.CERT_NONE,
118+
"cert_reqs": (
119+
ssl.CERT_REQUIRED
120+
if self._ssl_options.tls_verify
121+
else ssl.CERT_NONE
122+
),
121123
"ca_certs": self._ssl_options.tls_trusted_ca_file,
122124
"cert_file": self._ssl_options.tls_client_cert_file,
123125
"key_file": self._ssl_options.tls_client_cert_key_file,

src/databricks/sql/cloudfetch/downloader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def run(self) -> DownloadedFile:
100100
self.link.fileLink,
101101
timeout=self.settings.download_timeout,
102102
verify=self._ssl_options.tls_verify,
103-
headers=self.link.httpHeaders
103+
headers=self.link.httpHeaders,
104104
# TODO: Pass cert from `self._ssl_options`
105105
)
106106
response.raise_for_status()

src/databricks/sql/thrift_backend.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,10 @@ def _create_arrow_table(self, t_row_set, lz4_compressed, schema_bytes, descripti
613613
num_rows,
614614
) = convert_column_based_set_to_arrow_table(t_row_set.columns, description)
615615
elif t_row_set.arrowBatches is not None:
616-
(arrow_table, num_rows,) = convert_arrow_based_set_to_arrow_table(
616+
(
617+
arrow_table,
618+
num_rows,
619+
) = convert_arrow_based_set_to_arrow_table(
617620
t_row_set.arrowBatches, lz4_compressed, schema_bytes
618621
)
619622
else:

0 commit comments

Comments
 (0)