forked from VimPlug/jedi
Remove an unnecessary else
This commit is contained in:
+11
-11
@@ -336,17 +336,17 @@ def _is_safe(executable_path):
|
|||||||
for environment in find_python_environments():
|
for environment in find_python_environments():
|
||||||
if environment.executable == real_path:
|
if environment.executable == real_path:
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
# If the versions don't match, just compare the binary files. If we
|
# If the versions don't match, just compare the binary files. If we
|
||||||
# don't do that, only venvs will be working and not virtualenvs.
|
# don't do that, only venvs will be working and not virtualenvs.
|
||||||
# venvs are symlinks while virtualenvs are actual copies of the
|
# venvs are symlinks while virtualenvs are actual copies of the
|
||||||
# Python files.
|
# Python files.
|
||||||
# This still means that if the system Python is updated and the
|
# This still means that if the system Python is updated and the
|
||||||
# virtualenv's Python is not (which is probably never going to get
|
# virtualenv's Python is not (which is probably never going to get
|
||||||
# upgraded), it will not work with Jedi. IMO that's fine, because
|
# upgraded), it will not work with Jedi. IMO that's fine, because
|
||||||
# people should just be using venv. ~ dave
|
# people should just be using venv. ~ dave
|
||||||
if environment._sha256 == _calculate_sha256_for_file(real_path):
|
if environment._sha256 == _calculate_sha256_for_file(real_path):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user