Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
846aee3a
Unverified
Commit
846aee3a
authored
May 23, 2023
by
David Hotham
Committed by
GitHub
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix check for in-project-venv (#7977)
parent
88cb8266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/poetry/utils/env.py
+10
-2
No files found.
src/poetry/utils/env.py
View file @
846aee3a
...
...
@@ -695,7 +695,7 @@ class EnvManager:
if
not
in_venv
or
env
is
not
None
:
# Checking if a local virtualenv exists
if
self
.
use_in_project_venv
():
if
self
.
in_project_venv_exists
():
venv
=
self
.
in_project_venv
return
VirtualEnv
(
venv
)
...
...
@@ -733,7 +733,7 @@ class EnvManager:
venv_path
=
self
.
_poetry
.
config
.
virtualenvs_path
env_list
=
[
VirtualEnv
(
p
)
for
p
in
sorted
(
venv_path
.
glob
(
f
"{venv_name}-py*"
))]
if
self
.
use_in_project_venv
():
if
self
.
in_project_venv_exists
():
venv
=
self
.
in_project_venv
env_list
.
insert
(
0
,
VirtualEnv
(
venv
))
return
env_list
...
...
@@ -852,6 +852,14 @@ class EnvManager:
in_project
:
bool
|
None
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.in-project"
)
if
in_project
is
not
None
:
return
in_project
return
self
.
in_project_venv
.
is_dir
()
def
in_project_venv_exists
(
self
)
->
bool
:
in_project
:
bool
|
None
=
self
.
_poetry
.
config
.
get
(
"virtualenvs.in-project"
)
if
in_project
is
False
:
return
False
return
self
.
in_project_venv
.
is_dir
()
def
create_venv
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment