mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-15 09:44:46 +03:00
Merge 0620daf860
into 092d4422d5
This commit is contained in:
commit
3182a9b1e1
|
@ -9,7 +9,7 @@ from PIL import __version__
|
||||||
pyroma = pytest.importorskip("pyroma", reason="Pyroma not installed")
|
pyroma = pytest.importorskip("pyroma", reason="Pyroma not installed")
|
||||||
|
|
||||||
|
|
||||||
def map_metadata_keys(metadata):
|
def map_metadata_keys(md):
|
||||||
# Convert installed wheel metadata into canonical Core Metadata 2.4 format.
|
# Convert installed wheel metadata into canonical Core Metadata 2.4 format.
|
||||||
# This was a utility method in pyroma 4.3.3; it was removed in 5.0.
|
# This was a utility method in pyroma 4.3.3; it was removed in 5.0.
|
||||||
# This implementation is constructed from the relevant logic from
|
# This implementation is constructed from the relevant logic from
|
||||||
|
@ -17,8 +17,8 @@ def map_metadata_keys(metadata):
|
||||||
# upstream to Pyroma as https://github.com/regebro/pyroma/pull/116,
|
# upstream to Pyroma as https://github.com/regebro/pyroma/pull/116,
|
||||||
# so it may be possible to simplify this test in future.
|
# so it may be possible to simplify this test in future.
|
||||||
data = {}
|
data = {}
|
||||||
for key in set(metadata.keys()):
|
for key in set(md.keys()):
|
||||||
value = metadata.get_all(key)
|
value = md.get_all(key)
|
||||||
key = pyroma.projectdata.normalize(key)
|
key = pyroma.projectdata.normalize(key)
|
||||||
|
|
||||||
if len(value) == 1:
|
if len(value) == 1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user