From 96f10a16a2d853a4e359aaa23c79f7a7fa7c34cf Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sun, 15 Jan 2017 06:18:35 -0800 Subject: [PATCH] doc more misc things --- dns/set.py | 3 +-- dns/ttl.py | 12 ++++++------ doc/exceptions.rst | 5 +++++ doc/utilities.rst | 5 +++++ 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dns/set.py b/dns/set.py index 7a137ed4..b419ff4a 100644 --- a/dns/set.py +++ b/dns/set.py @@ -28,8 +28,7 @@ class Set(object): def __init__(self, items=None): """Initialize the set. - @param items: the initial set of items - @type items: any iterable or None + *items*, an iterable or ``None``, the initial set of items. """ self.items = [] diff --git a/dns/ttl.py b/dns/ttl.py index a27d8251..4690728d 100644 --- a/dns/ttl.py +++ b/dns/ttl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. +# Copyright (C) 2003-2017 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, @@ -20,7 +20,6 @@ from ._compat import long class BadTTL(dns.exception.SyntaxError): - """DNS TTL value is not well-formed.""" @@ -29,10 +28,11 @@ def from_text(text): The BIND 8 units syntax for TTLs (e.g. '1w6d4h3m10s') is supported. - @param text: the textual TTL - @type text: string - @raises dns.ttl.BadTTL: the TTL is not well-formed - @rtype: int + *text*, a ``text``, the textual TTL. + + Raises ``dns.ttl.BadTTL`` if the TTL is not well-formed. + + Returns an ``int``. """ if text.isdigit(): diff --git a/doc/exceptions.rst b/doc/exceptions.rst index 8f50843f..879e593a 100644 --- a/doc/exceptions.rst +++ b/doc/exceptions.rst @@ -49,3 +49,8 @@ dns.rdataset Exceptions .. autoexception:: dns.rdataset.DifferingCovers .. autoexception:: dns.rdataset.IncompatibleTypes + +dns.ttl Exceptions +------------------ + +.. autoexception:: dns.ttl.BadTTL diff --git a/doc/utilities.rst b/doc/utilities.rst index 1f5475d1..29373614 100644 --- a/doc/utilities.rst +++ b/doc/utilities.rst @@ -11,3 +11,8 @@ Miscellaneous Utilities .. automodule:: dns.ipv6 :members: + +.. autofunction:: dns.ttl.from_text + +.. automodule:: dns.set + :members: -- 2.47.3