3535
3636LOG : logging .Logger = logging .getLogger (__name__ )
3737
38- PYSA_HANDLER_OBJ : None
39-
4038
4139class PysaServer :
4240 # I/O Channels
@@ -103,7 +101,6 @@ async def wait_for_exit(self) -> int:
103101 async def process_open_request (
104102 self , parameters : lsp .DidOpenTextDocumentParameters
105103 ) -> None :
106- # LOG.info("** Inside process_open_request() **")
107104 document_path = parameters .text_document .document_uri ().to_file_path ()
108105 if document_path is None :
109106 raise json_rpc .InvalidRequestError (
@@ -113,7 +110,6 @@ async def process_open_request(
113110 async def process_close_request (
114111 self , parameters : lsp .DidCloseTextDocumentParameters
115112 ) -> None :
116- # LOG.info("** Inside process_close_request() **")
117113 document_path = parameters .text_document .document_uri ().to_file_path ()
118114 if document_path is None :
119115 raise json_rpc .InvalidRequestError (
@@ -128,7 +124,6 @@ async def process_close_request(
128124 async def process_did_save_request (
129125 self , parameters : lsp .DidSaveTextDocumentParameters
130126 ) -> None :
131- # LOG.info("** Inside process_did_save_request() **")
132127 document_path = parameters .text_document .document_uri ().to_file_path ()
133128 if document_path is None :
134129 raise json_rpc .InvalidRequestError (
@@ -150,7 +145,6 @@ async def run(self) -> int:
150145 )
151146 return await self .wait_for_exit ()
152147 elif request .method == "textDocument/didOpen" :
153- # LOG.info("** A Document just opened! **")
154148 parameters = request .parameters
155149 if parameters is None :
156150 raise json_rpc .InvalidRequestError (
@@ -162,7 +156,6 @@ async def run(self) -> int:
162156 )
163157 )
164158 elif request .method == "textDocument/didClose" :
165- # LOG.info("** A Document just closed! **")
166159 parameters = request .parameters
167160 if parameters is None :
168161 raise json_rpc .InvalidRequestError (
@@ -174,7 +167,6 @@ async def run(self) -> int:
174167 )
175168 )
176169 elif request .method == "textDocument/didSave" :
177- # LOG.info("** A Document just saved! **")
178170 parameters = request .parameters
179171 if parameters is None :
180172 raise json_rpc .InvalidRequestError (
@@ -192,7 +184,6 @@ async def run(self) -> int:
192184async def run_persistent (
193185 binary_location : str , server_identifier : str , pysa_arguments : start .Arguments
194186) -> int :
195- global PYSA_HANDLER_OBJ
196187 stdin , stdout = await connection .create_async_stdin_stdout ()
197188 while True :
198189 initialize_result = await try_initialize (stdin , stdout )
@@ -225,7 +216,7 @@ async def run_persistent(
225216 server_identifier = server_identifier ,
226217 pyre_arguments = pysa_arguments ,
227218 )
228- return await server .run ()
219+ return await server ._run ()
229220 elif isinstance (initialize_result , InitializationFailure ):
230221 exception = initialize_result .exception
231222 message = (
0 commit comments