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

[tor-commits] [stem/master] Fix various pydoc typos



commit e2c69117b388abbbeee9240e67365e893b137cd3
Author: Sean Robinson <seankrobinson@xxxxxxxxx>
Date:   Tue Dec 4 18:38:27 2012 -0700

    Fix various pydoc typos
    
    Corrections from Sean for our is_alive methods, get_info, and other methods.
---
 stem/control.py         |   12 +++++++-----
 stem/response/events.py |    4 ++--
 stem/socket.py          |    2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index db5b9c5..a53b9b1 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -322,7 +322,7 @@ class BaseController(object):
     Checks if our socket is currently connected. This is a pass-through for our
     socket's :func:`~stem.socket.ControlSocket.is_alive` method.
     
-    :returns: **bool** that's **True** if we're shut down and **False** otherwise
+    :returns: **bool** that's **True** if our socket is connected and **False** otherwise
     """
     
     return self._socket.is_alive()
@@ -639,7 +639,7 @@ class Controller(BaseController):
     Directs further tor controller events to a given function. The function is
     expected to take a single argument, which is a
     :class:`~stem.response.events.Event` subclass. For instance the following
-    would would print the bytes sent and received by tor over five seconds...
+    would print the bytes sent and received by tor over five seconds...
     
     ::
     
@@ -730,7 +730,7 @@ class Controller(BaseController):
     call fails for any reason (error response, control port closed, initiated,
     etc).
     
-    :param str,list param: GETINFO option or options to be queried
+    :param str,list params: GETINFO option or options to be queried
     :param object default: response if the query fails
     
     :returns:
@@ -743,8 +743,10 @@ class Controller(BaseController):
     :raises:
       * :class:`stem.ControllerError` if the call fails and we weren't
         provided a default response
-      * :class:`stem.InvalidArguments` if the 'param' requested was
+      * :class:`stem.InvalidArguments` if the 'params' requested was
         invalid
+      * :class:`stem.ProtocolError` if the geoip database is unavailable
+        and the response is not in the cache
     """
     
     start_time = time.time()
@@ -766,7 +768,7 @@ class Controller(BaseController):
         reply[param] = self._request_cache[cache_key]
         params.remove(param)
       elif param.startswith('ip-to-country/') and self.is_geoip_unavailable():
-        # the geoip database aleady looks to be unavailable - abort the request
+        # the geoip database already looks to be unavailable - abort the request
         raise stem.ProtocolError("Tor geoip database is unavailable")
     
     # if everything was cached then short circuit making the query
diff --git a/stem/response/events.py b/stem/response/events.py
index eb2aa64..7526c88 100644
--- a/stem/response/events.py
+++ b/stem/response/events.py
@@ -222,7 +222,7 @@ class BuildTimeoutSetEvent(Event):
   :var int total_times: circuit build times tor used to determine the timeout
   :var int timeout: circuit timeout value in milliseconds
   :var int xm: Pareto parameter Xm in milliseconds
-  :var float alpha: Paredo paremter alpha
+  :var float alpha: Pareto parameter alpha
   :var float quantile: CDF quantile cutoff point
   :var float timeout_rate: ratio of circuits that have time out
   :var int close_timeout: duration to keep measurement circuits in milliseconds
@@ -432,7 +432,7 @@ class ConfChangedEvent(Event):
   SETCONF or RELOAD signal.
   
   :var dict config: mapping of configuration options to their new values
-    (**None** of the option is being unset)
+    (**None** if the option is being unset)
   """
   
   _SKIP_PARSING = True
diff --git a/stem/socket.py b/stem/socket.py
index ebaaaae..e4358fa 100644
--- a/stem/socket.py
+++ b/stem/socket.py
@@ -139,7 +139,7 @@ class ControlSocket(object):
     you need to continually pull from the socket (which is part of what the
     :class:`~stem.control.BaseController` does).
     
-    :returns: bool that's True if we're known to be shut down and False otherwise
+    :returns: **bool** that's **True** if our socket is connected and **False** otherwise
     """
     
     return self._is_alive



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