mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-08 10:50:59 +08:00
Consistently use '= ...' for optional parameters.
This commit is contained in:
@@ -24,11 +24,11 @@ class _ResultMixinBase(Generic[AnyStr]):
|
||||
def geturl(self) -> AnyStr: ...
|
||||
|
||||
class _ResultMixinStr(_ResultMixinBase[str]):
|
||||
def encode(self, encoding: str = 'ascii', errors: str = 'strict') -> '_ResultMixinBytes': ...
|
||||
def encode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinBytes': ...
|
||||
|
||||
|
||||
class _ResultMixinBytes(_ResultMixinBase[str]):
|
||||
def decode(self, encoding: str = 'ascii', errors: str = 'strict') -> '_ResultMixinStr': ...
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinStr': ...
|
||||
|
||||
|
||||
class _NetlocResultMixinBase(Generic[AnyStr]):
|
||||
@@ -76,17 +76,17 @@ class SplitResultBytes(_SplitResultBase[bytes], _NetlocResultMixinBytes): ...
|
||||
class ParseResultBytes(_ParseResultBase[bytes], _NetlocResultMixinBytes): ...
|
||||
|
||||
|
||||
def parse_qs(qs: str, keep_blank_values : bool = False, strict_parsing : bool = False, encoding : str = 'utf-8', errors: str = 'replace') -> Dict[str, List[str]]: ...
|
||||
def parse_qs(qs: str, keep_blank_values : bool = ..., strict_parsing : bool = ..., encoding : str = ..., errors: str = ...) -> Dict[str, List[str]]: ...
|
||||
|
||||
def parse_qsl(qs: str, keep_blank_values: bool = False, strict_parsing: bool = False, encoding: str = 'utf-8', errors: str = 'replace') -> List[Tuple[str,str]]: ...
|
||||
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[str,str]]: ...
|
||||
|
||||
def quote(string: AnyStr, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ...
|
||||
def quote(string: AnyStr, safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
def quote_from_bytes(bs: bytes, safe: AnyStr = None) -> bytes: ...
|
||||
def quote_from_bytes(bs: bytes, safe: AnyStr = ...) -> bytes: ...
|
||||
|
||||
def quote_plus(string: AnyStr, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ...
|
||||
def quote_plus(string: AnyStr, safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
def unquote(string: str, encoding: str = 'utf-8', errors: str = 'replace') -> str: ...
|
||||
def unquote(string: str, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
def unquote_to_bytes(string: AnyStr) -> bytes: ...
|
||||
|
||||
@@ -96,21 +96,21 @@ def urldefrag(url: str) -> DefragResult: ...
|
||||
def urldefrag(url: bytes) -> DefragResultBytes: ...
|
||||
|
||||
@overload
|
||||
def urlencode(query: Mapping[AnyStr, AnyStr], doseq: bool = False, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ...
|
||||
def urlencode(query: Mapping[AnyStr, AnyStr], doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...
|
||||
@overload
|
||||
def urlencode(query: Sequence[Tuple[AnyStr, AnyStr]], doseq: bool = False, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ...
|
||||
def urlencode(query: Sequence[Tuple[AnyStr, AnyStr]], doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
def urljoin(base: AnyStr, url: AnyStr, allow_fragments: bool = True) -> AnyStr: ...
|
||||
def urljoin(base: AnyStr, url: AnyStr, allow_fragments: bool = ...) -> AnyStr: ...
|
||||
|
||||
@overload
|
||||
def urlparse(url: str, scheme: str = None, allow_framgents: bool = True) -> ParseResult: ...
|
||||
def urlparse(url: str, scheme: str = ..., allow_framgents: bool = ...) -> ParseResult: ...
|
||||
@overload
|
||||
def urlparse(url: bytes, scheme: bytes = None, allow_framgents: bool = True) -> ParseResultBytes: ...
|
||||
def urlparse(url: bytes, scheme: bytes = ..., allow_framgents: bool = ...) -> ParseResultBytes: ...
|
||||
|
||||
@overload
|
||||
def urlsplit(url: str, scheme: str = None, allow_fragments: bool = True) -> SplitResult: ...
|
||||
def urlsplit(url: str, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...
|
||||
@overload
|
||||
def urlsplit(url: bytes, scheme: bytes = None, allow_fragments: bool = True) -> SplitResultBytes: ...
|
||||
def urlsplit(url: bytes, scheme: bytes = ..., allow_fragments: bool = ...) -> SplitResultBytes: ...
|
||||
|
||||
@overload
|
||||
def urlunparse(components: Sequence[AnyStr]) -> AnyStr: ...
|
||||
|
||||
Reference in New Issue
Block a user