Merge remote-tracking branch 'origin/master' into typeshed

This commit is contained in:
Dave Halter
2019-04-13 01:52:15 +02:00
5 changed files with 56 additions and 2 deletions

View File

@@ -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:

View File

@@ -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)