Skip to content

Commit

Permalink
Black codebase
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
  • Loading branch information
susodapop committed May 9, 2023
1 parent 73d49db commit 06f93d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions dbt/adapters/databricks/python_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
DEFAULT_TIMEOUT = 60 * 60 * 24
DBT_SPARK_VERSION = __version__.version


class BearerAuth(requests.auth.AuthBase):
"""See issue #337.
We use this mix-in to stop requests from implicitly reading .netrc
Solution taken from SO post in issue description.
"""

Expand All @@ -37,7 +38,6 @@ def __call__(self, r: requests.PreparedRequest) -> requests.PreparedRequest:
return r



class BaseDatabricksHelper(PythonJobHelper):
def __init__(self, parsed_model: Dict, credentials: DatabricksCredentials) -> None:
self.credentials = credentials
Expand Down Expand Up @@ -217,7 +217,11 @@ def submit(self, compiled_code: str) -> None:

class DBContext:
def __init__(
self, credentials: DatabricksCredentials, cluster_id: str, auth: BearerAuth, extra_headers: dict
self,
credentials: DatabricksCredentials,
cluster_id: str,
auth: BearerAuth,
extra_headers: dict,
) -> None:
self.auth = auth
self.extra_headers = extra_headers
Expand Down Expand Up @@ -324,7 +328,11 @@ def get_elapsed() -> float:

class DBCommand:
def __init__(
self, credentials: DatabricksCredentials, cluster_id: str, auth: BearerAuth, extra_headers: dict
self,
credentials: DatabricksCredentials,
cluster_id: str,
auth: BearerAuth,
extra_headers: dict,
) -> None:
self.auth = auth
self.extra_headers = extra_headers
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _get_plugin_version():
"dbt-spark>=1.5.0",
"databricks-sql-connector>=2.5.0",
"databricks-sdk>=0.1.1",
"keyring>=23.13.0"
"keyring>=23.13.0",
],
zip_safe=False,
classifiers=[
Expand Down

0 comments on commit 06f93d1

Please sign in to comment.