Fix `PurePath.relative_to` links in the pathlib documentation. (GH-93268)

These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.
This commit is contained in:
jacksonriley 2022-06-07 19:54:16 +01:00 committed by GitHub
parent 296081a7ce
commit 8ef7929baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1265,7 +1265,7 @@ Below is a table mapping various :mod:`os` functions to their corresponding
:func:`os.link` :meth:`Path.hardlink_to`
:func:`os.symlink` :meth:`Path.symlink_to`
:func:`os.readlink` :meth:`Path.readlink`
:func:`os.path.relpath` :meth:`Path.relative_to` [#]_
:func:`os.path.relpath` :meth:`PurePath.relative_to` [#]_
:func:`os.stat` :meth:`Path.stat`,
:meth:`Path.owner`,
:meth:`Path.group`
@ -1280,4 +1280,4 @@ Below is a table mapping various :mod:`os` functions to their corresponding
.. rubric:: Footnotes
.. [#] :func:`os.path.abspath` normalizes the resulting path, which may change its meaning in the presence of symlinks, while :meth:`Path.absolute` does not.
.. [#] :meth:`Path.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not.
.. [#] :meth:`PurePath.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not.