@@ -159,11 +159,12 @@ def use_snippets(document, position):
159
159
def _format_completion (d , include_params = True , profile_ranges = None ):
160
160
t1 = datetime .now ()
161
161
completion = {
162
- # 'documentation': _utils.format_docstring(d.docstring()),
162
+ 'documentation' : _utils .format_docstring (d .docstring ()),
163
163
}
164
164
t2 = datetime .now ()
165
+ sig = d .get_signatures ()
165
166
completion .update ({
166
- 'label' : d . name ,
167
+ 'label' : _label ( d , sig ) ,
167
168
'kind' : _TYPE_MAP .get (d .type ),
168
169
'sortText' : _sort_text (d ),
169
170
'insertText' : d .name ,
@@ -177,10 +178,12 @@ def _format_completion(d, include_params=True, profile_ranges=None):
177
178
path = path .replace ('/' , '\\ /' )
178
179
completion ['insertText' ] = path
179
180
181
+ profile_ranges ['documentation' ] += (t2 - t1 )
182
+ profile_ranges ['update' ] += (t3 - t2 )
183
+ profile_ranges ['total' ] += (t3 - t1 )
180
184
if not include_params :
181
185
return completion
182
186
183
- sig = d .get_signatures ()
184
187
if sig and not is_exception_class (d .name ):
185
188
completion ['label' ] = _label (d , sig )
186
189
positional_args = [param for param in sig [0 ].params
@@ -204,9 +207,6 @@ def _format_completion(d, include_params=True, profile_ranges=None):
204
207
completion ['insertText' ] = d .name + '()'
205
208
# t4 = datetime.now()
206
209
207
- profile_ranges ['documentation' ] += (t2 - t1 )
208
- profile_ranges ['update' ] += (t3 - t2 )
209
- profile_ranges ['total' ] += (t3 - t1 )
210
210
# profile_ranges['path'] += (t3 - t2)
211
211
# profile_ranges['forks'] += (t4 - t3)
212
212
0 commit comments