Skip to content

Do not call get_signatures() if snippets are disabled #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pylsp/plugins/jedi_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,11 @@ def _format_completion(d, include_params=True, resolve=False, resolve_label=Fals
path = path.replace('/', '\\/')
completion['insertText'] = path

sig = d.get_signatures()
if (include_params and sig and not is_exception_class(d.name)):
if include_params and not is_exception_class(d.name):
sig = d.get_signatures()
if not sig:
return completion

positional_args = [param for param in sig[0].params
if '=' not in param.description and
param.name not in {'/', '*'}]
Expand Down