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
92dc54a8
Commit
92dc54a8
authored
Mar 21, 2021
by
Arun Babu Neelicattu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
env: add missing type hinting
parent
ba60ed88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
poetry/utils/env.py
+11
-3
No files found.
poetry/utils/env.py
View file @
92dc54a8
...
@@ -14,6 +14,7 @@ from contextlib import contextmanager
...
@@ -14,6 +14,7 @@ from contextlib import contextmanager
from
pathlib
import
Path
from
pathlib
import
Path
from
subprocess
import
CalledProcessError
from
subprocess
import
CalledProcessError
from
typing
import
Any
from
typing
import
Any
from
typing
import
ContextManager
from
typing
import
Dict
from
typing
import
Dict
from
typing
import
Iterator
from
typing
import
Iterator
from
typing
import
List
from
typing
import
List
...
@@ -813,8 +814,8 @@ class EnvManager(object):
...
@@ -813,8 +814,8 @@ class EnvManager(object):
executable
:
Optional
[
Union
[
str
,
Path
]]
=
None
,
executable
:
Optional
[
Union
[
str
,
Path
]]
=
None
,
flags
:
Dict
[
str
,
bool
]
=
None
,
flags
:
Dict
[
str
,
bool
]
=
None
,
with_pip
:
bool
=
False
,
with_pip
:
bool
=
False
,
with_wheel
:
bool
=
Fals
e
,
with_wheel
:
Optional
[
bool
]
=
Non
e
,
with_setuptools
:
bool
=
Fals
e
,
with_setuptools
:
Optional
[
bool
]
=
Non
e
,
)
->
virtualenv
.
run
.
session
.
Session
:
)
->
virtualenv
.
run
.
session
.
Session
:
flags
=
flags
or
{}
flags
=
flags
or
{}
...
@@ -832,6 +833,8 @@ class EnvManager(object):
...
@@ -832,6 +833,8 @@ class EnvManager(object):
args
.
append
(
"--no-pip"
)
args
.
append
(
"--no-pip"
)
else
:
else
:
if
with_wheel
is
None
:
if
with_wheel
is
None
:
# we want wheels to be enabled when pip is required and it has
# not been explicitly disabled
with_wheel
=
True
with_wheel
=
True
if
with_wheel
is
None
or
not
with_wheel
:
if
with_wheel
is
None
or
not
with_wheel
:
...
@@ -1442,7 +1445,12 @@ class NullEnv(SystemEnv):
...
@@ -1442,7 +1445,12 @@ class NullEnv(SystemEnv):
@contextmanager
@contextmanager
def
ephemeral_environment
(
executable
=
None
,
pip
=
False
,
wheel
=
None
,
setuptools
=
None
):
def
ephemeral_environment
(
executable
=
None
,
pip
:
bool
=
False
,
wheel
:
Optional
[
bool
]
=
None
,
setuptools
:
Optional
[
bool
]
=
None
,
)
->
ContextManager
[
VirtualEnv
]:
with
temporary_directory
()
as
tmp_dir
:
with
temporary_directory
()
as
tmp_dir
:
# TODO: cache PEP 517 build environment corresponding to each project venv
# TODO: cache PEP 517 build environment corresponding to each project venv
venv_dir
=
Path
(
tmp_dir
)
/
".venv"
venv_dir
=
Path
(
tmp_dir
)
/
".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