Replace :yield: with :return: as the former is not standard rest.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 19 Dec 2010 18:11:43 +0000 (19:11 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Dec 2010 18:11:43 +0000 (19:11 +0100)
dulwich/diff_tree.py
dulwich/object_store.py

index 3c1d0f3d15a9dfd70bd63fb8e310058c38d79b65..61ebd7656ec88b1a3ec9197913439851ab030a13 100644 (file)
@@ -122,10 +122,11 @@ def walk_trees(store, tree1_id, tree2_id, prune_identical=False):
     :param tree1_id: The SHA of the first Tree object to iterate, or None.
     :param tree2_id: The SHA of the second Tree object to iterate, or None.
     :param prune_identical: If True, identical subtrees will not be walked.
-    :yield: Pairs of TreeEntry objects for each pair of entries in the trees and
-        their subtrees recursively. If an entry exists in one tree but not the
-        other, the other entry will have all attributes set to None. If neither
-        entry's path is None, they are guaranteed to match.
+    :return: Iterator over Pairs of TreeEntry objects for each pair of entries
+        in the trees and their subtrees recursively. If an entry exists in one
+        tree but not the other, the other entry will have all attributes set
+        to None. If neither entry's path is None, they are guaranteed to
+        match.
     """
     # This could be fairly easily generalized to >2 trees if we find a use case.
     mode1 = tree1_id and stat.S_IFDIR or None
@@ -159,8 +160,8 @@ def tree_changes(store, tree1_id, tree2_id, want_unchanged=False):
     :param tree2_id: The SHA of the target tree.
     :param want_unchanged: If True, include TreeChanges for unmodified entries
         as well.
-    :yield: TreeChange instances for each change between the source and target
-        tree.
+    :return: Iterator over TreeChange instances for each change between the
+        source and target tree.
     """
     entries = walk_trees(store, tree1_id, tree2_id,
                          prune_identical=(not want_unchanged))
index f353c9ab94aa6801e821aa9e154759bbd5ab6998..9c40b5da86d0294a295a00223be86a65df4dc373 100644 (file)
@@ -149,7 +149,8 @@ class BaseObjectStore(object):
 
         :param tree_id: SHA1 of the tree.
         :param include_trees: If True, include tree objects in the iteration.
-        :yield: TreeEntry namedtuples for all the objects in a tree.
+        :return: Iterator over TreeEntry namedtuples for all the objects in a
+            tree.
         """
         for entry, _ in walk_trees(self, tree_id, None):
             if not stat.S_ISDIR(entry.mode) or include_trees: