Use .is_file in place of .exists
This commit is contained in:
parent
3c64f1110c
commit
eab0eb34d2
|
@ -371,7 +371,7 @@ def _in_venv(path: Path) -> bool:
|
|||
"""Attempt to detect if ``path`` is the root of a Virtual Environment by
|
||||
checking for the existence of the pyvenv.cfg file."""
|
||||
try:
|
||||
return path.joinpath("pyvenv.cfg").exists()
|
||||
return path.joinpath("pyvenv.cfg").is_file()
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue