]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
web: Fix type annotation for docs build 3112/head
authorBen Darnell <ben@bendarnell.com>
Tue, 8 Feb 2022 02:20:47 +0000 (21:20 -0500)
committerBen Darnell <ben@bendarnell.com>
Tue, 8 Feb 2022 02:35:20 +0000 (21:35 -0500)
Our version of sphinx isn't resolving this annotation correctly.

Introduced in #3014 because CI was broken when it was submitted.

docs/conf.py
tornado/web.py

index efa1c01d030cb0ecec815e2149713110db579e1f..c47edd6f5cbbf0e94726a81ba60b9455c2d9ad2b 100644 (file)
@@ -128,6 +128,7 @@ missing_references = {
     "tornado.options._Mockable",
     "tornado.web._ArgDefaultMarker",
     "tornado.web._HandlerDelegate",
+    "_RequestHandlerType",
     "traceback",
     "WSGIAppType",
     "Yieldable",
index 589d21a15b4b18959cdbca507a191be75335ceff..2dab485a480007e972d8b8795dc9ecb50231c9f9 100644 (file)
@@ -1822,10 +1822,10 @@ class RequestHandler(object):
             self.clear_header(h)
 
 
-RequestHandlerType = TypeVar("RequestHandlerType", bound=RequestHandler)
+_RequestHandlerType = TypeVar("_RequestHandlerType", bound=RequestHandler)
 
 
-def stream_request_body(cls: Type[RequestHandlerType]) -> Type[RequestHandlerType]:
+def stream_request_body(cls: Type[_RequestHandlerType]) -> Type[_RequestHandlerType]:
     """Apply to `RequestHandler` subclasses to enable streaming body support.
 
     This decorator implies the following changes: