From: Ben Darnell Date: Tue, 27 Nov 2012 02:46:16 +0000 (-0500) Subject: Doc cleanups. X-Git-Tag: v3.0.0~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c5ad60da3909b13b6d3f8e52657c1ff5fa61534;p=thirdparty%2Ftornado.git Doc cleanups. * Fix doc generation for httpclient.py (unescaped \r\n) * Manually specify signature of Template constructor * Include IOLoop.time Closes #644. --- diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 945e12b31..7359a76ce 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -221,7 +221,7 @@ class HTTPRequest(object): validate_cert=None, ca_certs=None, allow_ipv6=None, client_key=None, client_cert=None): - """Creates an `HTTPRequest`. + r"""Creates an `HTTPRequest`. All parameters except `url` are optional. diff --git a/tornado/template.py b/tornado/template.py index 8c045c561..0cd8124e8 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -203,6 +203,9 @@ class Template(object): We compile into Python from the given template_string. You can generate the template from variables with generate(). """ + # note that the constructor's signature is not extracted with + # autodoc because _UNSET looks like garbage. When changing + # this signature update website/sphinx/template.rst too. def __init__(self, template_string, name="", loader=None, compress_whitespace=None, autoescape=_UNSET): self.name = name diff --git a/website/sphinx/conf.py b/website/sphinx/conf.py index 86992f44e..f2509aa5d 100644 --- a/website/sphinx/conf.py +++ b/website/sphinx/conf.py @@ -30,6 +30,9 @@ coverage_ignore_classes = [ "Runner", "YieldPoint", + # tornado.ioloop + "PollIOLoop", + # tornado.web "ChunkedTransferEncoding", "GZipContentEncoding", diff --git a/website/sphinx/ioloop.rst b/website/sphinx/ioloop.rst index ce7fdd8f4..ec64dae81 100644 --- a/website/sphinx/ioloop.rst +++ b/website/sphinx/ioloop.rst @@ -25,14 +25,15 @@ .. automethod:: IOLoop.update_handler .. automethod:: IOLoop.remove_handler - Timeouts - ^^^^^^^^ + Callbacks and timeouts + ^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: IOLoop.add_callback .. automethod:: IOLoop.add_callback_from_signal .. automethod:: IOLoop.add_future .. automethod:: IOLoop.add_timeout .. automethod:: IOLoop.remove_timeout + .. automethod:: IOLoop.time .. autoclass:: PeriodicCallback :members: diff --git a/website/sphinx/template.rst b/website/sphinx/template.rst index 40d0be2b8..caf345d25 100644 --- a/website/sphinx/template.rst +++ b/website/sphinx/template.rst @@ -6,7 +6,7 @@ Class reference --------------- - .. autoclass:: Template + .. autoclass:: Template(template_string, name="", loader=None, compress_whitespace=None, autoescape="xhtml_escape") :members: .. autoclass:: BaseLoader