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
f0f5ae22
Commit
f0f5ae22
authored
May 15, 2022
by
David Hotham
Committed by
Arun Babu Neelicattu
May 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle importlib typing at python 3.7
parent
f33c9db2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
pyproject.toml
+12
-0
src/poetry/repositories/installed_repository.py
+12
-3
No files found.
pyproject.toml
View file @
f0f5ae22
...
...
@@ -127,6 +127,18 @@ module = [
]
ignore_errors
=
true
# use of importlib-metadata backport at python3.7 makes it impossible to
# satisfy mypy without some ignores: but we get a different set of ignores at
# different python versions.
#
# <https://github.com/python/mypy/issues/8823>, meanwhile suppress that
# warning.
[[tool.mypy.overrides]]
module
=
[
'poetry.repositories.installed_repository'
,
]
warn_unused_ignores
=
false
[[tool.mypy.overrides]]
module
=
[
'cachecontrol.*'
,
...
...
src/poetry/repositories/installed_repository.py
View file @
f0f5ae22
...
...
@@ -163,7 +163,11 @@ class InstalledRepository(Repository):
source_reference
=
source_reference
,
source_resolved_reference
=
source_resolved_reference
,
)
package
.
description
=
distribution
.
metadata
.
get
(
"summary"
,
""
)
package
.
description
=
distribution
.
metadata
.
get
(
# type: ignore[attr-defined]
"summary"
,
""
,
)
return
package
...
...
@@ -213,7 +217,10 @@ class InstalledRepository(Repository):
develop
=
develop
,
)
package
.
description
=
distribution
.
metadata
.
get
(
"summary"
,
""
)
package
.
description
=
distribution
.
metadata
.
get
(
# type: ignore[attr-defined]
"summary"
,
""
,
)
return
package
...
...
@@ -229,7 +236,9 @@ class InstalledRepository(Repository):
for
entry
in
reversed
(
env
.
sys_path
):
for
distribution
in
sorted
(
metadata
.
distributions
(
path
=
[
entry
]),
metadata
.
distributions
(
# type: ignore[no-untyped-call]
path
=
[
entry
],
),
key
=
lambda
d
:
str
(
d
.
_path
),
# type: ignore[attr-defined]
):
name
=
canonicalize_name
(
distribution
.
metadata
[
"name"
])
...
...
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