Skip to content

Commit

Permalink
Address Python code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Zhang committed Apr 16, 2024
1 parent 95ef828 commit a76dc0d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/brad/front_end/front_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,18 @@ def __init__(
from brad.front_end.flight_sql_server import BradFlightSqlServer

self._flight_sql_server: Optional[BradFlightSqlServer] = (
BradFlightSqlServer(host="0.0.0.0",
port=31337,
callback=self._handle_query_from_flight_sql)
BradFlightSqlServer(
host="0.0.0.0",
port=31337,
callback=self._handle_query_from_flight_sql,
)
)
self._flight_sql_server_session_id = None
else:
self._flight_sql_server = None

self._main_thread_loop = None

self._fe_index = fe_index
self._config = config
self._schema_name = schema_name
Expand Down Expand Up @@ -195,7 +200,7 @@ def __init__(
def _handle_query_from_flight_sql(self, query: str) -> RowList:
future = asyncio.run_coroutine_threadsafe(
self._run_query_impl(self._flight_sql_server_session_id, query, {}),
self._main_thread_loop
self._main_thread_loop,
)
row_result = future.result()

Expand Down

0 comments on commit a76dc0d

Please sign in to comment.