8000 [3.12] gh-125018: Fix role syntax (GH-125050) (#125055) · python/cpython@d2b3071 · GitHub
[go: up one dir, main page]

Skip to content

Commit d2b3071

Browse files
[3.12] gh-125018: Fix role syntax (GH-125050) (#125055)
gh-125018: Fix role syntax (GH-125050) (cherry picked from commit 10094a5) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent fa32f00 commit d2b3071

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/importlib.metadata.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Entry points
122122

123123
Returns a :class:`EntryPoints` instance describing entry points for the
124124
current environment. Any given keyword parameters are passed to the
125-
:meth:`!~EntryPoints.select` method for comparison to the attributes of
125+
:meth:`!select` method for comparison to the attributes of
126126
the individual entry point definitions.
127127

128128
Note: it is not currently possible to query for entry points based on
@@ -158,7 +158,7 @@ attributes for convenience::
158158
>>> sorted(eps.groups) # doctest: +SKIP
159159
['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setuptools.installation']
160160

161-
:class:`!EntryPoints` has a :meth:`!~EntryPoints.select` method to select entry points
161+
:class:`!EntryPoints` has a :meth:`!select` method to select entry points
162162
matching specific properties. Select entry points in the
163163
``console_scripts`` group::
164164

@@ -230,7 +230,7 @@ Distribution metadata
230230
`PackageMetadata protocol <https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata>`_.
231231

232232
In addition to providing the defined protocol methods and attributes, subscripting
233-
the instance is equivalent to calling the :meth:`!~PackageMetadata.get` method.
233+
the instance is equivalent to calling the :meth:`!get` method.
234234

235235
Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_
236236
includes some metadata, which you can extract using the :func:`!metadata` function::
@@ -243,7 +243,7 @@ the values are returned unparsed from the distribution metadata::
243243
>>> wheel_metadata['Requires-Python'] # doctest: +SKIP
244244
'>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
245245

246-
:class:`PackageMetadata` also presents a :attr:`!~PackageMetadata.json` attribute that returns
246+
:class:`PackageMetadata` also presents a :attr:`!json` attribute that returns
247247
all the metadata in a JSON-compatible form per :PEP:`566`::
248248

249249
>>> wheel_metadata.json['requires_python']
@@ -329,7 +329,7 @@ Once you have the file, you can also read its contents::
329329
return s.encode('utf-8')
330330
return s
331331

332-
You can also use the :meth:`!~PackagePath.locate` method to get the absolute
332+
You can also use the :meth:`!locate` method to get the absolute
333333
path to the file::
334334

335335
>>> util.locate() # doctest: +SKIP

0 commit comments

Comments
 (0)
0