Skip to content

Commit 0c06347

Browse files
committed
improve the readability of a docstring
1 parent d72dc7c commit 0c06347

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

libarchive/write.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,24 @@ def add_file_from_memory(
8181
):
8282
""""Add file from memory to archive.
8383
84-
:param entry_path: where entry should be places in archive
85-
:type entry_path: str
86-
:param entry_size: entire size of entry in bytes
87-
:type entry_size: int
88-
:param entry_data: content of entry
89-
:type entry_data: bytes or Iterable[bytes]
90-
:param filetype: which type of file: normal, symlink etc.
91-
should entry be created as
92-
:type filetype: octal number
93-
:param permission: with which permission should entry be created
94-
:type permission: octal number
95-
:param atime: Last access time
96-
:type atime: int seconds or tuple (int seconds, int nanoseconds)
97-
:param mtime: Last modified time
98-
:type mtime: int seconds or tuple (int seconds, int nanoseconds)
99-
:param ctime: Creation time
100-
:type ctime: int seconds or tuple (int seconds, int nanoseconds)
101-
:param birthtime: Birth time (for archive formats that support it)
102-
:type birthtime: int seconds or tuple (int seconds, int nanoseconds)
84+
Args:
85+
entry_path (str): the file's path
86+
entry_size (int): the file's size, in bytes
87+
entry_data (bytes | Iterable[bytes]): the file's content
88+
filetype (int): the file's type (normal, symlink, etc.)
89+
permission (int): the file's permissions
90+
atime (int | Tuple[int]):
91+
the file's most recent access time,
92+
in seconds or as a tuple (seconds, nanoseconds)
93+
mtime (int | Tuple[int]):
94+
the file's most recent modification time,
95+
in seconds or as a tuple (seconds, nanoseconds)
96+
ctime (int | Tuple[int]):
97+
the file's creation time,
98+
in seconds or as a tuple (seconds, nanoseconds)
99+
birthtime (int | Tuple[int]):
100+
the file's birth time (for archive formats that support it),
101+
in seconds or as a tuple (seconds, nanoseconds)
103102
"""
104103
archive_pointer = self._pointer
105104

0 commit comments

Comments
 (0)