Skip to content

[3.11] tarfile: Fix positional-only syntax in docs (GH-105770) #105772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/library/tarfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ can be:
path to where the archive is extracted (i.e. the same path is used for all
members)::

filter(/, member: TarInfo, path: str) -> TarInfo | None
filter(member: TarInfo, path: str, /) -> TarInfo | None

The callable is called just before each member is extracted, so it can
take the current state of the disk into account.
Expand All @@ -921,13 +921,13 @@ Default named filters
The pre-defined, named filters are available as functions, so they can be
reused in custom filters:

.. function:: fully_trusted_filter(/, member, path)
.. function:: fully_trusted_filter(member, path)

Return *member* unchanged.

This implements the ``'fully_trusted'`` filter.

.. function:: tar_filter(/, member, path)
.. function:: tar_filter(member, path)

Implements the ``'tar'`` filter.

Expand All @@ -944,7 +944,7 @@ reused in custom filters:

Return the modified ``TarInfo`` member.

.. function:: data_filter(/, member, path)
.. function:: data_filter(member, path)

Implements the ``'data'`` filter.
In addition to what ``tar_filter`` does:
Expand Down