[tor-commits] [bridgedb/master] Sphinxify and improve docstring for FilteredBridgeSplitter.addRing().

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:31 UTC 2014


commit 4747c1d2a184e94711d32e26d85494a1340661f4
Author: Isis Lovecruft <isis at torproject.org>
Date:   Fri Nov 15 13:39:22 2013 +0000

    Sphinxify and improve docstring for FilteredBridgeSplitter.addRing().
---
 lib/bridgedb/Bridges.py |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 340ac44..a59c56d 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -1046,12 +1046,17 @@ class FilteredBridgeSplitter(BridgeHolder):
                 logging.debug("insert bridge into %s" % n)
 
     def addRing(self, ring, ringname, filterFn, populate_from=None):
-        """Add a ring to this splitter.
-        ring -- the ring to add
-        ringname -- a unique string identifying the ring
-        filterFn -- a function whose input is a Bridge, and returns
-        True or False
-        populate_from -- an iterable of Bridges
+        """Add a subring to this hashring.
+
+        :type subring: :class:`BridgeHolder`
+        :param subring: The subring to add.
+        :param string ringname: A unique name for identifying the new
+            subring.
+        :param filterFn: A function whose input is a :class:`Bridge`, and
+            returns True/False based on some filtration criteria.
+        :type populate_from: iterable or None
+        :param populate_from: A group of :class:`Bridge`s. If given, the newly
+            added subring will be populated with these bridges.
         """
         assert isinstance(ring, BridgeHolder)
         assert ringname not in self.filterRings.keys()





More information about the tor-commits mailing list