Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03b9ad0

Browse files
committed
Add a single versionadded for a whole section instead of repeating for every function.
1 parent 96acb73 commit 03b9ad0

1 file changed

Lines changed: 4 additions & 18 deletions

File tree

Doc/library/shutil.rst

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Directory and files operations
306306
.. _shutil-copytree-example:
307307

308308
copytree example
309-
::::::::::::::::
309+
~~~~~~~~~~~~~~~~
310310

311311
This example is the implementation of the :func:`copytree` function, described
312312
above, with the docstring omitted. It demonstrates many of the other functions
@@ -370,6 +370,8 @@ Another example that uses the *ignore* argument to add a logging call::
370370
Archiving operations
371371
--------------------
372372

373+
.. versionadded:: 3.2
374+
373375
High-level utilities to create and read compressed and archived files are also
374376
provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
375377

@@ -397,8 +399,6 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
397399
*logger* must be an object compatible with :pep:`282`, usually an instance of
398400
:class:`logging.Logger`.
399401

400-
.. versionadded:: 3.2
401-
402402

403403
.. function:: get_archive_formats()
404404

@@ -415,8 +415,6 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
415415
You can register new formats or provide your own archiver for any existing
416416
formats, by using :func:`register_archive_format`.
417417

418-
.. versionadded:: 3.2
419-
420418

421419
.. function:: register_archive_format(name, function, [extra_args, [description]])
422420

@@ -429,15 +427,11 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
429427
*description* is used by :func:`get_archive_formats` which returns the
430428
list of archivers. Defaults to an empty list.
431429

432-
.. versionadded:: 3.2
433-
434430

435431
.. function:: unregister_archive_format(name)
436432

437433
Remove the archive format *name* from the list of supported formats.
438434

439-
.. versionadded:: 3.2
440-
441435

442436
.. function:: unpack_archive(filename[, extract_dir[, format]])
443437

@@ -452,8 +446,6 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
452446
and see if an unpacker was registered for that extension. In case none is
453447
found, a :exc:`ValueError` is raised.
454448

455-
.. versionadded:: 3.2
456-
457449

458450
.. function:: register_unpack_format(name, extensions, function[, extra_args[, description]])
459451

@@ -471,15 +463,11 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
471463
*description* can be provided to describe the format, and will be returned
472464
by the :func:`get_unpack_formats` function.
473465

474-
.. versionadded:: 3.2
475-
476466

477467
.. function:: unregister_unpack_format(name)
478468

479469
Unregister an unpack format. *name* is the name of the format.
480470

481-
.. versionadded:: 3.2
482-
483471

484472
.. function:: get_unpack_formats()
485473

@@ -497,13 +485,11 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
497485
You can register new formats or provide your own unpacker for any existing
498486
formats, by using :func:`register_unpack_format`.
499487

500-
.. versionadded:: 3.2
501-
502488

503489
.. _shutil-archiving-example:
504490

505491
Archiving example
506-
:::::::::::::::::
492+
~~~~~~~~~~~~~~~~~
507493

508494
In this example, we create a gzip'ed tar-file archive containing all files
509495
found in the :file:`.ssh` directory of the user::

0 commit comments

Comments
 (0)