Skip to content

Commit

Permalink
Improve stream_object_data and _parse_object_header docstrings
Browse files Browse the repository at this point in the history
This slightly adjusts working and formatting of these methods of
the Git class, for clarity.
  • Loading branch information
EliahKagan committed Mar 2, 2024
1 parent c0a27c0 commit fc59e5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,9 @@ def _call_process(
def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]:
"""
:param header_line:
<hex_sha> type_string size_as_int
A line of the form::
<hex_sha> type_string size_as_int
:return:
(hex_sha, type_string, size_as_int)
Expand Down Expand Up @@ -1581,7 +1583,7 @@ def get_object_data(self, ref: str) -> Tuple[str, str, int, bytes]:
return (hexsha, typename, size, data)

def stream_object_data(self, ref: str) -> Tuple[str, str, int, "Git.CatFileContentStream"]:
"""Similar to :meth:`get_object_header`, but returns the data as a stream.
"""Similar to :meth:`get_object_data`, but returns the data as a stream.
:return:
(hexsha, type_string, size_as_int, stream)
Expand Down

0 comments on commit fc59e5e

Please sign in to comment.