mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -25,11 +25,11 @@ if sys.version_info < (3, 8):
|
||||
__all__ += ["parse_qs", "parse_qsl", "escape"]
|
||||
|
||||
def parse(
|
||||
fp: IO[Any] | None = ...,
|
||||
fp: IO[Any] | None = None,
|
||||
environ: SupportsItemAccess[str, str] = ...,
|
||||
keep_blank_values: bool = ...,
|
||||
strict_parsing: bool = ...,
|
||||
separator: str = ...,
|
||||
separator: str = "&",
|
||||
) -> dict[str, list[str]]: ...
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
@@ -37,7 +37,7 @@ if sys.version_info < (3, 8):
|
||||
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> list[tuple[str, str]]: ...
|
||||
|
||||
def parse_multipart(
|
||||
fp: IO[Any], pdict: SupportsGetItem[str, bytes], encoding: str = ..., errors: str = ..., separator: str = ...
|
||||
fp: IO[Any], pdict: SupportsGetItem[str, bytes], encoding: str = "utf-8", errors: str = "replace", separator: str = "&"
|
||||
) -> dict[str, list[Any]]: ...
|
||||
|
||||
class _Environ(Protocol):
|
||||
@@ -93,24 +93,24 @@ class FieldStorage:
|
||||
value: None | bytes | _list[Any]
|
||||
def __init__(
|
||||
self,
|
||||
fp: IO[Any] | None = ...,
|
||||
headers: Mapping[str, str] | Message | None = ...,
|
||||
fp: IO[Any] | None = None,
|
||||
headers: Mapping[str, str] | Message | None = None,
|
||||
outerboundary: bytes = ...,
|
||||
environ: SupportsGetItem[str, str] = ...,
|
||||
keep_blank_values: int = ...,
|
||||
strict_parsing: int = ...,
|
||||
limit: int | None = ...,
|
||||
encoding: str = ...,
|
||||
errors: str = ...,
|
||||
max_num_fields: int | None = ...,
|
||||
separator: str = ...,
|
||||
keep_blank_values: int = 0,
|
||||
strict_parsing: int = 0,
|
||||
limit: int | None = None,
|
||||
encoding: str = "utf-8",
|
||||
errors: str = "replace",
|
||||
max_num_fields: int | None = None,
|
||||
separator: str = "&",
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __getitem__(self, key: str) -> Any: ...
|
||||
def getvalue(self, key: str, default: Any = ...) -> Any: ...
|
||||
def getfirst(self, key: str, default: Any = ...) -> Any: ...
|
||||
def getvalue(self, key: str, default: Any = None) -> Any: ...
|
||||
def getfirst(self, key: str, default: Any = None) -> Any: ...
|
||||
def getlist(self, key: str) -> _list[Any]: ...
|
||||
def keys(self) -> _list[str]: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
@@ -120,9 +120,9 @@ class FieldStorage:
|
||||
def make_file(self) -> IO[Any]: ...
|
||||
|
||||
def print_exception(
|
||||
type: type[BaseException] | None = ...,
|
||||
value: BaseException | None = ...,
|
||||
tb: TracebackType | None = ...,
|
||||
limit: int | None = ...,
|
||||
type: type[BaseException] | None = None,
|
||||
value: BaseException | None = None,
|
||||
tb: TracebackType | None = None,
|
||||
limit: int | None = None,
|
||||
) -> None: ...
|
||||
def print_arguments() -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user