Skip to content

Commit

Permalink
Further revise post_clear_cache docstring
Browse files Browse the repository at this point in the history
For gitpython-developers#1847. This removes the note, and splits out some related
material from the docstring's top line into a second paragraph
for readability (since the first sentence of the top line was
complete, and described usage).
  • Loading branch information
EliahKagan committed Feb 26, 2024
1 parent ca2ab61 commit 37421e1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions git/index/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ def __exit__(


def post_clear_cache(func: Callable[..., _T]) -> Callable[..., _T]:
"""Decorator for functions that alter the index using the git command. This would
invalidate our possibly existing entries dictionary which is why it must be deleted
to allow it to be lazily reread later.
"""Decorator for functions that alter the index using the git command.
:note:
This decorator is required because not all functions related to
:class:`~git.index.base.IndexFile` are implemented natively.
When a git command alters the index, this invalidates our possibly existing entries
dictionary, which is why it must be deleted to allow it to be lazily reread later.
"""

@wraps(func)
Expand Down

0 comments on commit 37421e1

Please sign in to comment.