3232 InitializationSuccess ,
3333 InitializationFailure ,
3434)
35- from api import query , connection as api_connection
36- from api .connection import PyreQueryError
3735
3836LOG : logging .Logger = logging .getLogger (__name__ )
3937
@@ -62,18 +60,6 @@ def __init__(
6260 self .binary_location = binary_location
6361 self .server_identifier = server_identifier
6462
65- async def update_errors (self , document_path ) -> None :
66- await _publish_diagnostics (self .output_channel , document_path , [])
67- pyre_connection = api_connection .PyreConnection (
68- Path (self .pyre_arguments .global_root )
69- )
70- try :
71- model_errors = query .get_invalid_taint_models (pyre_connection )
72- diagnostics = invalid_models_to_diagnostics (model_errors )
73- await self .show_model_errors_to_client (diagnostics )
74- except PyreQueryError as e :
75- await self .log_and_show_message_to_client (f"Error querying Pyre: { e } " , lsp .MessageType .WARNING )
76-
7763 async def show_message_to_client (
7864 self , message : str , level : lsp .MessageType = lsp .MessageType .INFO
7965 ) -> None :
@@ -121,8 +107,6 @@ async def process_open_request(
121107 f"Document URI is not a file: { parameters .text_document .uri } "
122108 )
123109
124- await self .update_errors (document_path )
125-
126110 async def process_close_request (
127111 self , parameters : lsp .DidCloseTextDocumentParameters
128112 ) -> None :
@@ -145,7 +129,6 @@ async def process_did_save_request(
145129 raise json_rpc .InvalidRequestError (
146130 f"Document URI is not a file: { parameters .text_document .uri } "
147131 )
148- await self .update_errors (document_path )
149132
150133 async def run (self ) -> int :
151134 while True :
@@ -233,7 +216,7 @@ async def run_persistent(
233216 server_identifier = server_identifier ,
234217 pyre_arguments = pysa_arguments ,
235218 )
236- return await server ._run ()
219+ return await server .run ()
237220 elif isinstance (initialize_result , InitializationFailure ):
238221 exception = initialize_result .exception
239222 message = (
0 commit comments