1- from typing import Any , Dict , Iterator , Optional , Tuple
1+ from typing import Any
2+ from collections .abc import Iterator
23
34__version__ : str
45
@@ -20,35 +21,33 @@ def pbkdf2_sha512(data: bytes, salt: bytes, rounds: int, klen: int) -> bytes: ..
2021
2122#: routing
2223class HTTPRouter :
23- def add_static_route (
24- self , route , path : str , method : str , host : Optional [str ] = None , scheme : Optional [str ] = None
25- ): ...
24+ def add_static_route (self , route , path : str , method : str , host : str | None = None , scheme : str | None = None ): ...
2625 def add_re_route (
2726 self ,
2827 route ,
2928 rule : str ,
30- rgtmap : Dict [str , str ],
29+ rgtmap : dict [str , str ],
3130 method : str ,
32- host : Optional [ str ] = None ,
33- scheme : Optional [ str ] = None ,
31+ host : str | None = None ,
32+ scheme : str | None = None ,
3433 ): ...
35- def match_route_direct (self , method : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
36- def match_route_scheme (self , scheme : str , method : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
37- def match_route_host (self , host : str , method : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
38- def match_route_all (self , host : str , scheme : str , method : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
34+ def match_route_direct (self , method : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
35+ def match_route_scheme (self , scheme : str , method : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
36+ def match_route_host (self , host : str , method : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
37+ def match_route_all (self , host : str , scheme : str , method : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
3938
4039class WSRouter :
41- def add_static_route (self , route , path : str , host : Optional [ str ] = None , scheme : Optional [ str ] = None ): ...
40+ def add_static_route (self , route , path : str , host : str | None = None , scheme : str | None = None ): ...
4241 def add_re_route (
43- self , route , rule : str , rgtmap : Dict [str , str ], host : Optional [ str ] = None , scheme : Optional [ str ] = None
42+ self , route , rule : str , rgtmap : dict [str , str ], host : str | None = None , scheme : str | None = None
4443 ): ...
45- def match_route_direct (self , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
46- def match_route_scheme (self , scheme : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
47- def match_route_host (self , host : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
48- def match_route_all (self , host : str , scheme : str , path : str ) -> Tuple [Any , Dict [str , Any ]]: ...
44+ def match_route_direct (self , path : str ) -> tuple [Any , dict [str , Any ]]: ...
45+ def match_route_scheme (self , scheme : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
46+ def match_route_host (self , host : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
47+ def match_route_all (self , host : str , scheme : str , path : str ) -> tuple [Any , dict [str , Any ]]: ...
4948
5049#: http
51- def get_content_type (header_value : str ) -> Optional [ str ] : ...
50+ def get_content_type (header_value : str ) -> str | None : ...
5251
5352#: multipart
5453class MultiPartReader :
@@ -57,14 +56,14 @@ class MultiPartReader:
5756 def contents (self ) -> MultiPartContentsIter : ...
5857
5958class MultiPartContentsIter :
60- def __iter__ (self ) -> Iterator [Tuple [str , bool , Any ]]: ...
59+ def __iter__ (self ) -> Iterator [tuple [str , bool , Any ]]: ...
6160
6261class FilePartReader :
63- content_type : Optional [ str ]
62+ content_type : str | None
6463 content_length : int
65- filename : Optional [ str ]
64+ filename : str | None
6665
67- def read (self , size : Optional [ int ] = None ) -> bytes : ...
66+ def read (self , size : int | None = None ) -> bytes : ...
6867 def __iter__ (self ) -> Iterator [bytes ]: ...
6968
7069class MultiPartEncodingError (UnicodeDecodeError ): ...
0 commit comments