doco fixes
authorBob Halley <halley@dnspython.org>
Sun, 8 Apr 2012 13:22:42 +0000 (14:22 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 8 Apr 2012 13:22:42 +0000 (14:22 +0100)
Makefile
dns/e164.py
dns/edns.py
dns/ipv4.py
dns/query.py
dns/resolver.py
dns/tokenizer.py

index 1f62c96c249129f6f127d5d65221a6e49436e0fd..b46afb9557877ae5262834565e3c3c09ef9f47ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ distclean: clean docclean
        rm -f MANIFEST
 
 doc:
-       epydoc -n dnspython -u http://www.dnspython.org \
+       epydoc -v -n dnspython -u http://www.dnspython.org \
                dns/*.py dns/rdtypes/*.py dns/rdtypes/ANY/*.py \
                dns/rdtypes/IN/*.py
 
index d6dcd1b1862af94376cba24f3773c76cb7810d4b..68f0a316a4fd896d8cbccf9385800ee84df244c9 100644 (file)
@@ -32,7 +32,7 @@ def from_e164(text, origin=public_enum_domain):
     @type text: str
     @param origin: The domain in which the number should be constructed.
     The default is e164.arpa.
-    @type: dns.name.Name object or None
+    @type origin: dns.name.Name object or None
     @rtype: dns.name.Name object
     """
     parts = [d for d in text if d.isdigit()]
@@ -45,7 +45,7 @@ def to_e164(name, origin=public_enum_domain, want_plus_prefix=True):
     @type name: dns.name.Name object.
     @param origin: A domain containing the ENUM domain name.  The
     name is relativized to this domain before being converted to text.
-    @type: dns.name.Name object or None
+    @type origin: dns.name.Name object or None
     @param want_plus_prefix: if True, add a '+' to the beginning of the
     returned number.
     @rtype: str
index f8b6009d3f34ae13a506d2f72779bc2d31e88920..4d4eaa8544d9c216d6dc7b58531429fc4cac5e51 100644 (file)
@@ -23,8 +23,8 @@ class Option(object):
 
     def __init__(self, otype):
         """Initialize an option.
-        @param rdtype: The rdata type
-        @type rdtype: int
+        @param otype: The rdata type
+        @type otype: int
         """
         self.otype = otype
 
index e117966e5fbe1d5ae2cba5f8967364e0b8a7ab0b..85ab48f7d4e9767fcc0d2842394a14795f5f5a0d 100644 (file)
@@ -20,12 +20,24 @@ import struct
 import dns.exception
 
 def inet_ntoa(address):
+    """Convert an IPv4 address in network form to text form.
+
+    @param address: The IPv4 address
+    @type address: string
+    @returns: string
+    """
     if len(address) != 4:
         raise dns.exception.SyntaxError
     return '%u.%u.%u.%u' % (ord(address[0]), ord(address[1]),
                             ord(address[2]), ord(address[3]))
 
 def inet_aton(text):
+    """Convert an IPv4 address in text form to network form.
+
+    @param text: The IPv4 address
+    @type text: string
+    @returns: string
+    """
     parts = text.split('.')
     if len(parts) != 4:
         raise dns.exception.SyntaxError
index 2ed0b6a1225a69968d1715bc0339415d5fd37e68..c141612c4b3052f99eba91372539f6fb9a8799db 100644 (file)
@@ -46,12 +46,15 @@ def _compute_expiration(timeout):
         return time.time() + timeout
 
 def _poll_for(fd, readable, writable, error, timeout):
-    """
-    @param fd: File descriptor (int).
-    @param readable: Whether to wait for readability (bool).
-    @param writable: Whether to wait for writability (bool).
-    @param expiration: Deadline timeout (expiration time, in seconds (float)).
-
+    """Poll polling backend.
+    @param fd: File descriptor
+    @type fd: int
+    @param readable: Whether to wait for readability
+    @type readable: bool
+    @param writable: Whether to wait for writability
+    @type writable: bool
+    @param timeout: Deadline timeout (expiration time, in seconds)
+    @type timeout: float
     @return True on success, False on timeout
     """
     event_mask = 0
@@ -73,12 +76,15 @@ def _poll_for(fd, readable, writable, error, timeout):
     return bool(event_list)
 
 def _select_for(fd, readable, writable, error, timeout):
-    """
-    @param fd: File descriptor (int).
-    @param readable: Whether to wait for readability (bool).
-    @param writable: Whether to wait for writability (bool).
-    @param expiration: Deadline timeout (expiration time, in seconds (float)).
-
+    """Select polling backend.
+    @param fd: File descriptor
+    @type fd: int
+    @param readable: Whether to wait for readability
+    @type readable: bool
+    @param writable: Whether to wait for writability
+    @type writable: bool
+    @param timeout: Deadline timeout (expiration time, in seconds)
+    @type timeout: float
     @return True on success, False on timeout
     """
     rset, wset, xset = [], [], []
index 437e14e92eeb34e073a78352c59c64931edbbd1b..ce77ac10a9c87f3de903efe6c81cb51516286479 100644 (file)
@@ -316,8 +316,7 @@ class LRUCache(object):
     def __init__(self, max_size=100000):
         """Initialize a DNS cache.
 
-        @param max_size: The maximum number of nodes to cache; the default is
-        100000.  Must be > 1.
+        @param max_size: The maximum number of nodes to cache; the default is 100000.  Must be > 1.
         @type max_size: int
         """
         self.data = {}
index 4bff7b6c72d552dc5441d6420221c54fd03b2648..ab5687310dad3f0f8e08568d212267cb9ee870dc 100644 (file)
@@ -62,9 +62,9 @@ class Token(object):
 
         @param ttype: The token type
         @type ttype: int
-        @ivar value: The token value
+        @param value: The token value
         @type value: string
-        @ivar has_escape: Does the token value contain escapes?
+        @param has_escape: Does the token value contain escapes?
         @type has_escape: bool
         """
         self.ttype = ttype