瀏覽代碼

Fix docstring syntax to be compatible with pydoctor.

Jelmer Vernooij 13 年之前
父節點
當前提交
77c90fc333
共有 2 個文件被更改,包括 6 次插入9 次删除
  1. 1 1
      dulwich/pack.py
  2. 5 8
      dulwich/tests/test_pack.py

+ 1 - 1
dulwich/pack.py

@@ -711,7 +711,7 @@ class PackStreamReader(object):
 
         :param compute_crc32: If True, compute the CRC32 of the compressed
             data. If False, the returned CRC32 will be None.
-        :yield: Tuples of (
+        :return: Iterator over tuples of (
             type number,
             list of uncompressed chunks,
             length of compressed data,

+ 5 - 8
dulwich/tests/test_pack.py

@@ -621,18 +621,15 @@ class DeltaChainIteratorTests(TestCase):
     def write_pack_data(self, objects_spec):
         """Write test pack data from a concise spec.
 
-        :param objects_spec: A list of (type_num, obj). For non-delta types, obj
-            is the string of that object's data.
-
+        :param objects_spec: A list of (type_num, obj). For non-delta types,
+            obj is the string of that object's data.
             For delta types, obj is a tuple of (base_index, data), where
             base_index is the index in objects_spec of the base for that delta,
             and data is the full, non-deltified data for that object.
             (Offsets/refs and deltas are computed within this function.)
-
-        :return: A tuple of (f, entries), where f is a file-like object pointed
-            at the beginning of a pack with the requested data, and entries is a
-            list of tuples of:
-              (offset, type num, data, sha, CRC32)
+        :return: A tuple of (f, entries), where f is a file-like object
+            pointed at the beginning of a pack with the requested data, and
+            entries is a list of tuples of (offset, type num, data, sha, CRC32)
             These tuples match the result format from TestPackIterator, and are
             returned in the order specified by objects_spec.
         """