MCPcopy
hub / github.com/ycm-core/YouCompleteMe / _HandlePollResponse

Function _HandlePollResponse

python/ycm/client/messages_request.py:73–91  ·  view source on GitHub ↗
( response, diagnostics_handler )

Source from the content-addressed store, hash-verified

71
72
73def _HandlePollResponse( response, diagnostics_handler ):
74 if isinstance( response, list ):
75 for notification in response:
76 if 'message' in notification:
77 PostVimMessage( notification[ 'message' ],
78 warning = False,
79 truncate = True )
80 elif 'diagnostics' in notification:
81 diagnostics_handler.UpdateWithNewDiagnosticsForFile(
82 notification[ 'filepath' ],
83 notification[ 'diagnostics' ] )
84 elif response is False:
85 # Don't keep polling for this file
86 return False
87 # else any truthy response means "nothing to see here; poll again in a
88 # while"
89
90 # Start the next poll (only if the last poll didn't raise an exception)
91 return True

Calls 2

PostVimMessageFunction · 0.90