[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 4747c1d2a184e94711d32e26d85494a1340661f4
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits