diff options
author | Stephan Creutz <stephan.cr@gmx.de> | 2022-12-29 14:50:43 +0100 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-12-29 21:54:43 +0100 |
commit | 44636240a08bba4a13355a5a23543d537ff15576 (patch) | |
tree | 58b8ffefce53940b18fd1afd11c590321758e0c5 /git/index | |
parent | 141cd651e459bff8919798b3ccf03dfa167757f6 (diff) | |
download | gitpython-44636240a08bba4a13355a5a23543d537ff15576.tar.gz |
Fix Sphinx rendering errors
These errors are mostly fixed by either adding blank lines or single
spaces for Sphinx documentation key words.
The commit solely includes documentation changes, no functional
changes.
Diffstat (limited to 'git/index')
-rw-r--r-- | git/index/base.py | 4 | ||||
-rw-r--r-- | git/index/fun.py | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/git/index/base.py b/git/index/base.py index 17d18db5..cda08de2 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -982,12 +982,12 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable): Additional arguments you would like to pass to git-mv, such as dry_run or force. - :return:List(tuple(source_path_string, destination_path_string), ...) + :return: List(tuple(source_path_string, destination_path_string), ...) A list of pairs, containing the source file moved as well as its actual destination. Relative to the repository root. :raise ValueError: If only one item was given - GitCommandError: If git could not handle your request""" + :raise GitCommandError: If git could not handle your request""" args = [] if skip_errors: args.append("-k") diff --git a/git/index/fun.py b/git/index/fun.py index 4659ac89..d0925ed5 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -82,6 +82,7 @@ def _has_file_extension(path): def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None: """Run the commit hook of the given name. Silently ignores hooks that do not exist. + :param name: name of hook, like 'pre-commit' :param index: IndexFile instance :param args: arguments passed to hook file @@ -234,11 +235,13 @@ def read_cache( stream: IO[bytes], ) -> Tuple[int, Dict[Tuple[PathLike, int], "IndexEntry"], bytes, bytes]: """Read a cache file from the given stream + :return: tuple(version, entries_dict, extension_data, content_sha) - * version is the integer version number - * entries dict is a dictionary which maps IndexEntry instances to a path at a stage - * extension_data is '' or 4 bytes of type + 4 bytes of size + size bytes - * content_sha is a 20 byte sha on all cache file contents""" + + * version is the integer version number + * entries dict is a dictionary which maps IndexEntry instances to a path at a stage + * extension_data is '' or 4 bytes of type + 4 bytes of size + size bytes + * content_sha is a 20 byte sha on all cache file contents""" version, num_entries = read_header(stream) count = 0 entries: Dict[Tuple[PathLike, int], "IndexEntry"] = {} |