forked from VimPlug/jedi
Merge remote-tracking branch 'origin/master' into typeshed
This commit is contained in:
+1
-1
@@ -397,7 +397,7 @@ class Completion(BaseDefinition):
|
||||
def _complete(self, like_name):
|
||||
append = ''
|
||||
if settings.add_bracket_after_function \
|
||||
and self.type == 'Function':
|
||||
and self.type == 'function':
|
||||
append = '('
|
||||
|
||||
if self._name.api_type == 'param' and self._stack is not None:
|
||||
|
||||
@@ -334,7 +334,10 @@ def get_system_environment(version):
|
||||
|
||||
if os.name == 'nt':
|
||||
for exe in _get_executables_from_windows_registry(version):
|
||||
return Environment(exe)
|
||||
try:
|
||||
return Environment(exe)
|
||||
except InvalidPythonEnvironment:
|
||||
pass
|
||||
raise InvalidPythonEnvironment("Cannot find executable python%s." % version)
|
||||
|
||||
|
||||
|
||||
@@ -190,6 +190,9 @@ def get_module_names(module, all_scopes):
|
||||
# but that would be a big change that could break type inference, whereas for now
|
||||
# this discrepancy looks like only a problem for "get_module_names".
|
||||
parent_scope = parent_scope.parent
|
||||
# async functions have an extra wrapper. Strip it.
|
||||
if parent_scope and parent_scope.type == 'async_stmt':
|
||||
parent_scope = parent_scope.parent
|
||||
return parent_scope in (module, None)
|
||||
|
||||
names = [n for n in names if is_module_scope_name(n)]
|
||||
|
||||
Reference in New Issue
Block a user