Skip to content

Commit 6021486

Browse files
committed
minor refactoring, minor fixes
1 parent 443942e commit 6021486

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/commands/v2/pysa_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def __init__(
6262
self.binary_location = binary_location
6363
self.server_identifier = server_identifier
6464

65-
async def update_errors(self) -> None:
65+
async def update_errors(self, document_path) -> None:
66+
await _publish_diagnostics(self.output_channel, document_path, [])
6667
pyre_connection = api_connection.PyreConnection(
6768
Path(self.pyre_arguments.global_root)
6869
)
@@ -120,6 +121,8 @@ async def process_open_request(
120121
f"Document URI is not a file: {parameters.text_document.uri}"
121122
)
122123

124+
await self.update_errors(document_path)
125+
123126
async def process_close_request(
124127
self, parameters: lsp.DidCloseTextDocumentParameters
125128
) -> None:
@@ -142,6 +145,7 @@ async def process_did_save_request(
142145
raise json_rpc.InvalidRequestError(
143146
f"Document URI is not a file: {parameters.text_document.uri}"
144147
)
148+
await self.update_errors(document_path)
145149

146150
async def run(self) -> int:
147151
while True:

0 commit comments

Comments
 (0)