@@ -46,9 +46,9 @@ def completions(self, path, location=Location(1, 1), prefix="", on_completed=Non
4646 req_dict = self .create_req_dict ("completions" , args )
4747 json_str = json_helpers .encode (req_dict )
4848 self .__comm .sendCmd (
49- lambda json_dict : None if on_completed is None else on_completed (json_dict ),
5049 json_str ,
51- req_dict ["seq" ]
50+ req_dict ["seq" ],
51+ lambda json_dict : None if on_completed is None else on_completed (json_dict )
5252 )
5353
5454 def async_completions (self , path , location = Location (1 , 1 ), prefix = "" , on_completed = None ):
@@ -62,9 +62,9 @@ def signature_help(self, path, location=Location(1, 1), prefix="", on_completed=
6262 req_dict = self .create_req_dict ("signatureHelp" , args )
6363 json_str = json_helpers .encode (req_dict )
6464 self .__comm .sendCmd (
65- lambda response_dict : None if on_completed is None else on_completed (response_dict ),
6665 json_str ,
67- req_dict ["seq" ]
66+ req_dict ["seq" ],
67+ lambda response_dict : None if on_completed is None else on_completed (response_dict )
6868 )
6969
7070 def async_signature_help (self , path , location = Location (1 , 1 ), prefix = "" , on_completed = None ):
@@ -156,17 +156,18 @@ def quick_info(self, path, location=Location(1, 1), onCompleted=None):
156156 args = {"file" : path , "line" : location .line , "offset" : location .offset }
157157 req_dict = self .create_req_dict ("quickinfo" , args )
158158 json_str = json_helpers .encode (req_dict )
159+ callback = lambda json_dict : None if onCompleted is None else onCompleted (json_dict )
159160 if not IS_ST2 :
160161 self .__comm .sendCmdAsync (
161162 json_str ,
162163 req_dict ["seq" ],
163- lambda json_dict : None if onCompleted is None else onCompleted ( json_dict )
164+ callback
164165 )
165166 else :
166167 self .__comm .sendCmd (
167- lambda json_dict : None if onCompleted is None else onCompleted (json_dict ),
168168 json_str ,
169- req_dict ["seq" ]
169+ req_dict ["seq" ],
170+ callback
170171 )
171172
172173 def get_event (self ):
0 commit comments