Skip to content

Commit

Permalink
docs: try to keep docstrings within 100 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
eiri committed Mar 27, 2024
1 parent 6eefc5d commit 290646f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/py_bitcask/bitcask.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def _reset(self) -> None:
"""
Resets internal state variables to their initial values.
This method resets the internal state of the object by clearing the key directory,
resetting the iterator, clearing the directory mapping, and setting the active file
descriptor to None.
This method resets the internal state of the object by clearing
the key directory, resetting the iterator,
clearing the directory mapping,
and setting the active file descriptor to None.
Returns:
None
Expand Down Expand Up @@ -110,7 +111,8 @@ def open(self, dataDir: str) -> bool:

def _open(self) -> None:
"""
Reads the storage in the specified data directory and propagates the keydir hash.
Reads the storage in the specified data directory
and propagates the keydir hash.
Returns:
None
Expand Down Expand Up @@ -328,7 +330,8 @@ def fold(
self, fun: Callable[[Any, Union[bytes, "Bitcask"]], Any], acc: Any
) -> Any:
"""
Applies a binary function to the elements in the storage, using an accumulator.
Applies a binary function to the elements in the storage,
using an accumulator.
Parameters:
- fun (Callable[[Any, Union[bytes, Bitcask]], Any]): The binary function to be applied.
Expand All @@ -341,7 +344,8 @@ def fold(

def __iter__(self):
"""
Returns an iterator over the values associated with the keys in the storage.
Returns an iterator over the values
associated with the keys in the storage.
Returns:
Bitcask: An iterator object.
Expand Down

0 comments on commit 290646f

Please sign in to comment.