1
1
import sys
2
2
from _typeshed .wsgi import WSGIEnvironment
3
3
from datetime import datetime , timedelta
4
- from typing import Any , Callable , Dict , Iterable , List , Mapping , SupportsInt , Text , Tuple , Type , TypeVar , Union , overload
4
+ from typing import Any , Callable , Iterable , Mapping , SupportsInt , Text , Tuple , Type , TypeVar , Union , overload
5
5
6
6
from .datastructures import (
7
7
Accept ,
@@ -29,41 +29,41 @@ else:
29
29
_T = TypeVar ("_T" )
30
30
_U = TypeVar ("_U" )
31
31
32
- HTTP_STATUS_CODES : Dict [int , str ]
32
+ HTTP_STATUS_CODES : dict [int , str ]
33
33
34
34
def wsgi_to_bytes (data : bytes | Text ) -> bytes : ...
35
35
def bytes_to_wsgi (data : bytes ) -> str : ...
36
36
def quote_header_value (value : Any , extra_chars : str = ..., allow_token : bool = ...) -> str : ...
37
37
def unquote_header_value (value : _Str , is_filename : bool = ...) -> _Str : ...
38
38
def dump_options_header (header : _Str | None , options : Mapping [_Str , Any ]) -> _Str : ...
39
- def dump_header (iterable : Iterable [Any ] | Dict [_Str , Any ], allow_token : bool = ...) -> _Str : ...
40
- def parse_list_header (value : _Str ) -> List [_Str ]: ...
39
+ def dump_header (iterable : Iterable [Any ] | dict [_Str , Any ], allow_token : bool = ...) -> _Str : ...
40
+ def parse_list_header (value : _Str ) -> list [_Str ]: ...
41
41
@overload
42
- def parse_dict_header (value : bytes | Text ) -> Dict [Text , Text | None ]: ...
42
+ def parse_dict_header (value : bytes | Text ) -> dict [Text , Text | None ]: ...
43
43
@overload
44
44
def parse_dict_header (value : bytes | Text , cls : Type [_T ]) -> _T : ...
45
45
@overload
46
- def parse_options_header (value : None , multiple : bool = ...) -> Tuple [str , Dict [str , str | None ]]: ...
46
+ def parse_options_header (value : None , multiple : bool = ...) -> Tuple [str , dict [str , str | None ]]: ...
47
47
@overload
48
- def parse_options_header (value : _Str ) -> Tuple [_Str , Dict [_Str , _Str | None ]]: ...
48
+ def parse_options_header (value : _Str ) -> Tuple [_Str , dict [_Str , _Str | None ]]: ...
49
49
50
- # actually returns Tuple[_Str, Dict [_Str, _Str | None], ...]
50
+ # actually returns Tuple[_Str, dict [_Str, _Str | None], ...]
51
51
@overload
52
52
def parse_options_header (value : _Str , multiple : bool = ...) -> Tuple [Any , ...]: ...
53
53
@overload
54
54
def parse_accept_header (value : Text | None ) -> Accept : ...
55
55
@overload
56
- def parse_accept_header (value : _Str | None , cls : Callable [[List [Tuple [str , float ]] | None ], _T ]) -> _T : ...
56
+ def parse_accept_header (value : _Str | None , cls : Callable [[list [Tuple [str , float ]] | None ], _T ]) -> _T : ...
57
57
@overload
58
58
def parse_cache_control_header (
59
59
value : None | bytes | Text , on_update : Callable [[RequestCacheControl ], Any ] | None = ...
60
60
) -> RequestCacheControl : ...
61
61
@overload
62
62
def parse_cache_control_header (
63
- value : None | bytes | Text , on_update : _T , cls : Callable [[Dict [Text , Text | None ], _T ], _U ]
63
+ value : None | bytes | Text , on_update : _T , cls : Callable [[dict [Text , Text | None ], _T ], _U ]
64
64
) -> _U : ...
65
65
@overload
66
- def parse_cache_control_header (value : None | bytes | Text , * , cls : Callable [[Dict [Text , Text | None ], None ], _U ]) -> _U : ...
66
+ def parse_cache_control_header (value : None | bytes | Text , * , cls : Callable [[dict [Text , Text | None ], None ], _U ]) -> _U : ...
67
67
def parse_set_header (value : Text , on_update : Callable [[HeaderSet ], Any ] | None = ...) -> HeaderSet : ...
68
68
def parse_authorization_header (value : None | bytes | Text ) -> Authorization | None : ...
69
69
def parse_www_authenticate_header (
@@ -90,8 +90,8 @@ def is_resource_modified(
90
90
last_modified : None | Text | datetime = ...,
91
91
ignore_if_range : bool = ...,
92
92
) -> bool : ...
93
- def remove_entity_headers (headers : List [Tuple [Text , Text ]] | Headers , allowed : Iterable [Text ] = ...) -> None : ...
94
- def remove_hop_by_hop_headers (headers : List [Tuple [Text , Text ]] | Headers ) -> None : ...
93
+ def remove_entity_headers (headers : list [Tuple [Text , Text ]] | Headers , allowed : Iterable [Text ] = ...) -> None : ...
94
+ def remove_hop_by_hop_headers (headers : list [Tuple [Text , Text ]] | Headers ) -> None : ...
95
95
def is_entity_header (header : Text ) -> bool : ...
96
96
def is_hop_by_hop_header (header : Text ) -> bool : ...
97
97
@overload
0 commit comments