From 7d85b674a5c7976cace8e38f935fa3aa620b0306 Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Tue, 16 Apr 2024 10:56:26 -0400 Subject: [PATCH] Address python type check errors --- src/brad/front_end/front_end.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/brad/front_end/front_end.py b/src/brad/front_end/front_end.py index ad4259d3..5af11477 100644 --- a/src/brad/front_end/front_end.py +++ b/src/brad/front_end/front_end.py @@ -96,11 +96,11 @@ def __init__( callback=self._handle_query_from_flight_sql, ) ) - self._flight_sql_server_session_id = None + self._flight_sql_server_session_id: Optional[SessionId] = None else: self._flight_sql_server = None - self._main_thread_loop = None + self._main_thread_loop: Optional[AbstractEventLoop] = None self._fe_index = fe_index self._config = config @@ -198,6 +198,8 @@ def __init__( self._is_stub_mode = self._config.stub_mode_path is not None def _handle_query_from_flight_sql(self, query: str) -> RowList: + assert self._flight_sql_server_session_id is not None + future = asyncio.run_coroutine_threadsafe( self._run_query_impl(self._flight_sql_server_session_id, query, {}), self._main_thread_loop,