Skip to content

Commit

Permalink
Address pylint ntoes
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jan 30, 2021
1 parent c946a4c commit 2226735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pyls/plugins/jedi_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
@hookimpl
def pyls_completions(config, document, position):
"""Get formatted completions for current code position"""
# pylint: disable=too-many-locals
# pylint: disable=global-statement
global _LAST_COMPLETIONS

settings = config.plugin_settings('jedi_completion', document_path=document.path)
Expand Down Expand Up @@ -100,7 +102,7 @@ def pyls_completions(config, document, position):


@hookimpl
def pyls_completion_item_resolve(config, completion_item):
def pyls_completion_item_resolve(completion_item):
"""Resolve formatted completion for given non-resolved completion"""
completion, data = _LAST_COMPLETIONS.get(completion_item['label'])
return _resolve_completion(completion, data)
Expand Down
4 changes: 3 additions & 1 deletion pyls/plugins/rope_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def _resolve_completion(completion, data):

@hookimpl
def pyls_completions(config, workspace, document, position):
# pylint: disable=too-many-locals
# pylint: disable=global-statement
global _LAST_COMPLETIONS

settings = config.plugin_settings('rope_completion', document_path=document.path)
Expand Down Expand Up @@ -77,7 +79,7 @@ def pyls_completions(config, workspace, document, position):


@hookimpl
def pyls_completion_item_resolve(config, completion_item):
def pyls_completion_item_resolve(completion_item):
"""Resolve formatted completion for given non-resolved completion"""
completion, data = _LAST_COMPLETIONS.get(completion_item['label'])
return _resolve_completion(completion, data)
Expand Down
3 changes: 1 addition & 2 deletions test/plugins/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def test_jedi_completion_item_resolve(config, workspace):
assert 'detail' not in documented_hello_item

resolved_documented_hello = pyls_jedi_completion_item_resolve(
config,
completion_item=documented_hello_item
)
assert 'Sends a polite greeting' in resolved_documented_hello['documentation']
Expand Down Expand Up @@ -359,7 +358,7 @@ def test_jedi_completion_environment(workspace):
completions = pyls_jedi_completions(doc._config, doc, com_position)
assert completions[0]['label'] == 'loghub'

resolved = pyls_jedi_completion_item_resolve(doc._config, completions[0])
resolved = pyls_jedi_completion_item_resolve(completions[0])
assert 'changelog generator' in resolved['documentation'].lower()


Expand Down

0 comments on commit 2226735

Please sign in to comment.