File tree Expand file tree Collapse file tree
stubs/Authlib/authlib/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from re import Pattern
2- from typing import Final , TypeAlias
2+ from typing import Final , TypeAlias , overload
33
44always_safe : Final [str ]
55urlencoded : Final [set [str ]]
@@ -9,10 +9,20 @@ _ExplodedQueryString: TypeAlias = list[tuple[str, str]]
99
1010def url_encode (params : _ExplodedQueryString ) -> str : ...
1111def url_decode (query : str ) -> _ExplodedQueryString : ...
12+ @overload
1213def add_params_to_qs (query : str , params : _ExplodedQueryString ) -> str : ...
14+ @overload
15+ def add_params_to_qs (query : str , params : dict [str , str ]) -> str : ...
1316def add_params_to_uri (uri : str , params : _ExplodedQueryString , fragment : bool = False ) -> str : ...
1417def quote (s : str , safe : bytes = b"/" ) -> str : ...
1518def unquote (s : str | bytes ) -> str : ...
1619def quote_url (s : str ) -> str : ...
17- def extract_params (raw : dict [str , str ] | _ExplodedQueryString ) -> _ExplodedQueryString : ...
20+ @overload
21+ def extract_params (raw : None ) -> None : ...
22+ @overload
23+ def extract_params (raw : dict [str , str ]) -> _ExplodedQueryString : ...
24+ @overload
25+ def extract_params (raw : _ExplodedQueryString ) -> _ExplodedQueryString : ...
26+ @overload
27+ def extract_params (raw : str ) -> _ExplodedQueryString | None : ...
1828def is_valid_url (url : str , fragments_allowed : bool = True ) -> bool : ...
You can’t perform that action at this time.
0 commit comments