Skip to content

Commit

Permalink
More format doc cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Dec 19, 2023
1 parent 7786ddc commit 62d6ea0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion binpickle/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ def encode(self):

@classmethod
def decode(cls, buf: bytes | bytearray | memoryview, *, verify: bool = True) -> FileTrailer:
"Decode a file trailer from bytes."
"""
Decode a file trailer from bytes.
Args:
buf: Buffer containing the trailer to decode.
verify: Whether to verify invalid trailer data (currently ignored).
"""
off, len, ck = TRAILER_FORMAT.unpack(buf)
return cls(off, len, ck)

Expand Down

0 comments on commit 62d6ea0

Please sign in to comment.