Skip to content

Commit 6dca3f7

Browse files
authored
New attributes and types on HTTPServerRequest (#3971)
Porting type information directly from the tornado repository: https://github.com/tornadoweb/tornado/blob/712d61079defdad23b0a5e9fe0090b54e55cf7d0/tornado/httputil.py#L340-L384
1 parent 0630c4b commit 6dca3f7

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

third_party/2and3/tornado/httputil.pyi

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, NamedTuple
1+
from typing import Any, Dict, List, NamedTuple, Optional
22

33
from tornado.util import ObjectDict
44

@@ -29,19 +29,21 @@ class HTTPHeaders(Dict[Any, Any]):
2929
def __deepcopy__(self, memo_dict): ...
3030

3131
class HTTPServerRequest:
32-
method: Any
33-
uri: Any
34-
version: Any
35-
headers: Any
36-
body: Any
32+
path: str
33+
query: str
34+
method: Optional[str]
35+
uri: Optional[str]
36+
version: str
37+
headers: HTTPHeaders
38+
body: bytes
3739
remote_ip: Any
3840
protocol: Any
39-
host: Any
40-
files: Any
41-
connection: Any
42-
arguments: Any
43-
query_arguments: Any
44-
body_arguments: Any
41+
host: str
42+
files: Dict[str, List[HTTPFile]]
43+
connection: Optional[HTTPConnection]
44+
arguments: Dict[str, List[bytes]]
45+
query_arguments: Dict[str, List[bytes]]
46+
body_arguments: Dict[str, List[bytes]]
4547
def __init__(self, method=..., uri=..., version=..., headers=..., body=..., host=..., files=..., connection=...,
4648
start_line=...) -> None: ...
4749
def supports_http_1_1(self): ...

0 commit comments

Comments
 (0)