Skip to content

Commit

Permalink
Start documenting module archive.archive
Browse files Browse the repository at this point in the history
  • Loading branch information
RKrahl committed Mar 18, 2024
1 parent 199a81d commit c218c9e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
25 changes: 23 additions & 2 deletions doc/src/mod-archive.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
:mod:`archive.archive` --- Provide the Archive class
====================================================

.. automodule:: archive.archive
:members:
.. py:module:: archive.archive
.. autoclass:: archive.archive.DedupMode
:members:
:show-inheritance:

.. attribute:: NEVER

never use hard links in the archive

.. attribute:: LINK

when already the input files were hard linked to each other in
the file system

.. attribute:: CONTENT

when the input files have the same content

.. autoclass:: archive.archive.Archive
:members:
:undoc-members:
:show-inheritance:
3 changes: 3 additions & 0 deletions src/archive/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def _is_normalized(p):
return False

class DedupMode(Enum):
"""De-duplication mode when creating an archive: when to use hard
links in the archive.
"""
NEVER = 'never'
LINK = 'link'
CONTENT = 'content'
Expand Down

0 comments on commit c218c9e

Please sign in to comment.