File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -695,7 +695,7 @@ def get(self, reload: bool = False) -> Env:
695
695
696
696
if not in_venv or env is not None :
697
697
# Checking if a local virtualenv exists
698
- if self .use_in_project_venv ():
698
+ if self .in_project_venv_exists ():
699
699
venv = self .in_project_venv
700
700
701
701
return VirtualEnv (venv )
@@ -733,7 +733,7 @@ def list(self, name: str | None = None) -> list[VirtualEnv]:
733
733
venv_path = self ._poetry .config .virtualenvs_path
734
734
env_list = [VirtualEnv (p ) for p in sorted (venv_path .glob (f"{ venv_name } -py*" ))]
735
735
736
- if self .use_in_project_venv ():
736
+ if self .in_project_venv_exists ():
737
737
venv = self .in_project_venv
738
738
env_list .insert (0 , VirtualEnv (venv ))
739
739
return env_list
@@ -852,6 +852,14 @@ def use_in_project_venv(self) -> bool:
852
852
in_project : bool | None = self ._poetry .config .get ("virtualenvs.in-project" )
853
853
if in_project is not None :
854
854
return in_project
855
+
856
+ return self .in_project_venv .is_dir ()
857
+
858
+ def in_project_venv_exists (self ) -> bool :
859
+ in_project : bool | None = self ._poetry .config .get ("virtualenvs.in-project" )
860
+ if in_project is False :
861
+ return False
862
+
855
863
return self .in_project_venv .is_dir ()
856
864
857
865
def create_venv (
You can’t perform that action at this time.
0 commit comments