Skip to content

Commit 2951e9f

Browse files
authored
Fix some code quality and bug-risk issues (#817)
1 parent 9b5cb21 commit 2951e9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyls/plugins/jedi_completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _format_completion(d, include_params=True):
181181
def _label(definition):
182182
sig = definition.get_signatures()
183183
if definition.type in ('function', 'method') and sig:
184-
params = ', '.join([param.name for param in sig[0].params])
184+
params = ', '.join(param.name for param in sig[0].params)
185185
return '{}({})'.format(definition.name, params)
186186

187187
return definition.name

pyls/workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def show_message(self, message, msg_type=lsp.MessageType.Info):
9898
def source_roots(self, document_path):
9999
"""Return the source roots for the given document."""
100100
files = _utils.find_parents(self._root_path, document_path, ['setup.py', 'pyproject.toml']) or []
101-
return list(set((os.path.dirname(project_file) for project_file in files))) or [self._root_path]
101+
return list({os.path.dirname(project_file) for project_file in files}) or [self._root_path]
102102

103103
def _create_document(self, doc_uri, source=None, version=None):
104104
path = uris.to_fs_path(doc_uri)

0 commit comments

Comments
 (0)