Permalink
Browse files

Doc cleanups.

* Fix doc generation for httpclient.py (unescaped \r\n)
* Manually specify signature of Template constructor
* Include IOLoop.time

Closes #644.
  • Loading branch information...
bdarnell committed Nov 27, 2012
1 parent 12c4e9f commit 8c5ad60da3909b13b6d3f8e52657c1ff5fa61534
Showing with 11 additions and 4 deletions.
  1. +1 −1 tornado/httpclient.py
  2. +3 −0 tornado/template.py
  3. +3 −0 website/sphinx/conf.py
  4. +3 −2 website/sphinx/ioloop.rst
  5. +1 −1 website/sphinx/template.rst
View
@@ -221,7 +221,7 @@ def __init__(self, url, method="GET", headers=None, body=None,
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.
View
@@ -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="<string>", loader=None,
compress_whitespace=None, autoescape=_UNSET):
self.name = name
View
@@ -30,6 +30,9 @@
"Runner",
"YieldPoint",
+ # tornado.ioloop
+ "PollIOLoop",
+
# tornado.web
"ChunkedTransferEncoding",
"GZipContentEncoding",
@@ -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:
@@ -6,7 +6,7 @@
Class reference
---------------
- .. autoclass:: Template
+ .. autoclass:: Template(template_string, name="<string>", loader=None, compress_whitespace=None, autoescape="xhtml_escape")
:members:
.. autoclass:: BaseLoader

0 comments on commit 8c5ad60

Please sign in to comment.