Skip to content

Commit

Permalink
Merge pull request #1786 from EliahKagan/iteritems-fix
Browse files Browse the repository at this point in the history
Fix incompletely revised Iterable/IterableObj docstrings
  • Loading branch information
Byron committed Dec 24, 2023
2 parents 619304c + 501005f commit 9bc7872
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,6 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> Iterator[T_Itera
filtering. However, when the method is called with no additional positional or
keyword arguments, subclasses are obliged to to yield all items.
For more information about the arguments, see list_items.
:return: Iterator yielding Items
"""
raise NotImplementedError("To be implemented by Subclass")
Expand All @@ -1214,7 +1212,7 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> Iterator[T_Itera
def list_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> IterableList[T_IterableObj]:
"""Find (all) items of this type and collect them into a list.
For more information about the arguments, see :meth:`list_items`.
For more information about the arguments, see :meth:`iter_items`.
:note: Favor the :meth:`iter_items` method as it will avoid eagerly collecting
all items. When there are many items, that can slow performance and increase
Expand Down Expand Up @@ -1261,7 +1259,7 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> Any:
Find (all) items of this type.
See :meth:`IterableObj.list_items` for details on usage.
See :meth:`IterableObj.iter_items` for details on usage.
:return: Iterator yielding Items
"""
Expand Down

0 comments on commit 9bc7872

Please sign in to comment.