diff --git a/pyls/plugins/jedi_completion.py b/pyls/plugins/jedi_completion.py index 18b94f13..978d0bd8 100644 --- a/pyls/plugins/jedi_completion.py +++ b/pyls/plugins/jedi_completion.py @@ -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) @@ -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) diff --git a/pyls/plugins/rope_completion.py b/pyls/plugins/rope_completion.py index 8c15e51f..3a5fa8d6 100644 --- a/pyls/plugins/rope_completion.py +++ b/pyls/plugins/rope_completion.py @@ -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) @@ -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) diff --git a/test/plugins/test_completion.py b/test/plugins/test_completion.py index 0fae1c8a..d75a4b55 100644 --- a/test/plugins/test_completion.py +++ b/test/plugins/test_completion.py @@ -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'] @@ -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()