Skip to content

Commit 1d7091b

Browse files
authored
Do not call get_signatures() if snippets are disabled (#58)
1 parent e3c5dfe commit 1d7091b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pylsp/plugins/jedi_completion.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,11 @@ def _format_completion(d, include_params=True, resolve=False, resolve_label=Fals
184184
path = path.replace('/', '\\/')
185185
completion['insertText'] = path
186186

187-
sig = d.get_signatures()
188-
if (include_params and sig and not is_exception_class(d.name)):
187+
if include_params and not is_exception_class(d.name):
188+
sig = d.get_signatures()
189+
if not sig:
190+
return completion
191+
189192
positional_args = [param for param in sig[0].params
190193
if '=' not in param.description and
191194
param.name not in {'/', '*'}]

0 commit comments

Comments
 (0)