Skip to content

Commit f606e59

Browse files
author
Jesse Whitehouse
committed
Black the code
Signed-off-by: Jesse Whitehouse <[email protected]>
1 parent 27dfff6 commit f606e59

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/databricks/sqlalchemy/dialect/__init__.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,21 +286,19 @@ def has_table(self, connection, table_name, schema=None, **kwargs) -> bool:
286286
return False
287287
else:
288288
raise e
289-
290-
289+
291290
def get_connection_cursor(self, connection):
292-
"""Added for backwards compatibility with 1.3.x
293-
"""
291+
"""Added for backwards compatibility with 1.3.x"""
294292
if hasattr(connection, "_dbapi_connection"):
295293
return connection._dbapi_connection.dbapi_connection.cursor()
296294
elif hasattr(connection, "raw_connection"):
297295
return connection.raw_connection().cursor()
298296
elif hasattr(connection, "connection"):
299297
return connection.connection.cursor()
300-
301-
raise SQLAlchemyError("Databricks dialect can't obtain a cursor context manager from the dbapi")
302-
303298

299+
raise SQLAlchemyError(
300+
"Databricks dialect can't obtain a cursor context manager from the dbapi"
301+
)
304302

305303
@reflection.cache
306304
def get_schema_names(self, connection, **kw):
@@ -328,7 +326,7 @@ def receive_do_connect(dialect, conn_rec, cargs, cparams):
328326
if sqlalchemy.__version__.startswith("1.3"):
329327
# SQLAlchemy 1.3.x fails to parse the http_path, catalog, and schema from our connection string
330328
# These should be passed in as connect_args when building the Engine
331-
329+
332330
if "schema" in cparams:
333331
dialect.schema = cparams["schema"]
334332

0 commit comments

Comments
 (0)