Skip to content

Commit dcd7bd5

Browse files
committed
Update docs and interface spec on metadata function to honor the new protocol.
1 parent ede5966 commit dcd7bd5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/using.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ Every distribution includes some metadata, which you can extract using the
108108

109109
>>> wheel_metadata = metadata('wheel')
110110

111-
The keys of the returned data structure [#f1]_ name the metadata keywords, and
112-
their values are returned unparsed from the distribution metadata::
111+
The keys of the returned data structure, a ``PackageMetadata``,
112+
name the metadata keywords, and
113+
the values are returned unparsed from the distribution metadata::
113114

114115
>>> wheel_metadata['Requires-Python']
115116
'>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'

importlib_metadata/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,11 @@ def distributions(**kwargs):
589589
return Distribution.discover(**kwargs)
590590

591591

592-
def metadata(distribution_name):
592+
def metadata(distribution_name) -> PackageMetadata:
593593
"""Get the metadata for the named package.
594594
595595
:param distribution_name: The name of the distribution package to query.
596-
:return: An email.Message containing the parsed metadata.
596+
:return: A PackageMetadata containing the parsed metadata.
597597
"""
598598
return Distribution.from_name(distribution_name).metadata
599599

0 commit comments

Comments
 (0)