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
eb38a4e4
Commit
eb38a4e4
authored
May 21, 2022
by
David Hotham
Committed by
Bjorn Neergaard
May 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typechecking for the pipelines
coping with with as-yet-untyped poetry.core, and different python versions
parent
cd4247f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
pyproject.toml
+2
-1
src/poetry/utils/env.py
+16
-5
No files found.
pyproject.toml
View file @
eb38a4e4
...
...
@@ -124,8 +124,9 @@ enable_error_code = [
[[tool.mypy.overrides]]
module
=
[
'poetry.installation.executor'
,
'poetry.repositories.installed_repository'
,
'poetry.mixology.version_solver'
,
'poetry.repositories.installed_repository'
,
'poetry.utils.env'
,
]
warn_unused_ignores
=
false
...
...
src/poetry/utils/env.py
View file @
eb38a4e4
...
...
@@ -308,7 +308,10 @@ class SitePackages:
)
)
yield
from
metadata
.
PathDistribution
.
discover
(
name
=
name
,
path
=
path
)
yield
from
metadata
.
PathDistribution
.
discover
(
# type: ignore[no-untyped-call]
name
=
name
,
path
=
path
,
)
def
find_distribution
(
self
,
name
:
str
,
writable_only
:
bool
=
False
...
...
@@ -326,7 +329,9 @@ class SitePackages:
assert
distribution
.
files
is
not
None
for
file
in
distribution
.
files
:
if
file
.
name
.
endswith
(
suffix
):
yield
Path
(
distribution
.
locate_file
(
file
))
yield
Path
(
distribution
.
locate_file
(
file
),
# type: ignore[no-untyped-call]
)
def
find_distribution_files_with_name
(
self
,
distribution_name
:
str
,
name
:
str
,
writable_only
:
bool
=
False
...
...
@@ -337,7 +342,9 @@ class SitePackages:
assert
distribution
.
files
is
not
None
for
file
in
distribution
.
files
:
if
file
.
name
==
name
:
yield
Path
(
distribution
.
locate_file
(
file
))
yield
Path
(
distribution
.
locate_file
(
file
),
# type: ignore[no-untyped-call]
)
def
find_distribution_nspkg_pth_files
(
self
,
distribution_name
:
str
,
writable_only
:
bool
=
False
...
...
@@ -365,7 +372,9 @@ class SitePackages:
):
assert
distribution
.
files
is
not
None
for
file
in
distribution
.
files
:
path
=
Path
(
distribution
.
locate_file
(
file
))
path
=
Path
(
distribution
.
locate_file
(
file
),
# type: ignore[no-untyped-call]
)
# We can't use unlink(missing_ok=True) because it's not always available
if
path
.
exists
():
path
.
unlink
()
...
...
@@ -883,6 +892,7 @@ class EnvManager:
if
not
name
:
name
=
self
.
_poetry
.
package
.
name
assert
name
is
not
None
python_patch
=
"."
.
join
([
str
(
v
)
for
v
in
sys
.
version_info
[:
3
]])
python_minor
=
"."
.
join
([
str
(
v
)
for
v
in
sys
.
version_info
[:
2
]])
...
...
@@ -1395,7 +1405,8 @@ class Env:
raise
NotImplementedError
()
def
is_valid_for_marker
(
self
,
marker
:
BaseMarker
)
->
bool
:
return
marker
.
validate
(
self
.
marker_env
)
valid
:
bool
=
marker
.
validate
(
self
.
marker_env
)
return
valid
def
is_sane
(
self
)
->
bool
:
"""
...
...
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