From 50327f00ee62dd93e2289fdb1206c1157f896c11 Mon Sep 17 00:00:00 2001 From: David Wetterau Date: Sat, 18 Mar 2017 14:52:30 -0700 Subject: [PATCH] Add types for parse_qs and parse_qsl when taking `bytes` as input (#1020) --- stdlib/3/urllib/parse.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/3/urllib/parse.pyi b/stdlib/3/urllib/parse.pyi index 25aec929d..05565e652 100644 --- a/stdlib/3/urllib/parse.pyi +++ b/stdlib/3/urllib/parse.pyi @@ -97,9 +97,10 @@ class SplitResultBytes(_SplitResultBytesBase, _NetlocResultMixinBytes): ... class ParseResultBytes(_ParseResultBytesBase, _NetlocResultMixinBytes): ... -def parse_qs(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> Dict[str, List[str]]: ... +def parse_qs(qs: AnyStr, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> Dict[AnyStr, List[AnyStr]]: ... + +def parse_qsl(qs: AnyStr, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[AnyStr, AnyStr]]: ... -def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[str, str]]: ... @overload def quote(string: str, safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...