From dd94a640b94d719ce27f3325c727e6c1ecf49706 Mon Sep 17 00:00:00 2001 From: Recursing Date: Fri, 21 Feb 2020 12:15:59 +0000 Subject: [PATCH] Standardize type documentation for HTTPRequest init --- tornado/httpclient.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 8418cd7f7..4b7009df0 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -401,7 +401,9 @@ class HTTPRequest(object): :type headers: `~tornado.httputil.HTTPHeaders` or `dict` :arg body: HTTP request body as a string (byte or unicode; if unicode the utf-8 encoding will be used) - :arg body_producer: Callable used for lazy/asynchronous request bodies. + :type body: `str` or `bytes` + :arg collections.abc.Callable body_producer: Callable used for + lazy/asynchronous request bodies. It is called with one argument, a ``write`` function, and should return a `.Future`. It should call the write function with new data as it becomes available. The write function returns a -- 2.47.2