[stdlib] Add more default values (#14632)

This commit is contained in:
Semyon Moroz
2025-08-24 15:56:42 +00:00
committed by GitHub
parent e8ba06f710
commit 91e2ed0953
16 changed files with 158 additions and 152 deletions
+5 -4
View File
@@ -1,3 +1,4 @@
import os
from _typeshed import SupportsContainsAndGetItem, SupportsGetItem, SupportsItemAccess, Unused
from builtins import list as _list, type as _type
from collections.abc import Iterable, Iterator, Mapping
@@ -23,7 +24,7 @@ __all__ = [
def parse(
fp: IO[Any] | None = None,
environ: SupportsItemAccess[str, str] = ...,
environ: SupportsItemAccess[str, str] = os.environ,
keep_blank_values: bool = ...,
strict_parsing: bool = ...,
separator: str = "&",
@@ -37,8 +38,8 @@ class _Environ(Protocol):
def keys(self) -> Iterable[str]: ...
def parse_header(line: str) -> tuple[str, dict[str, str]]: ...
def test(environ: _Environ = ...) -> None: ...
def print_environ(environ: _Environ = ...) -> None: ...
def test(environ: _Environ = os.environ) -> None: ...
def print_environ(environ: _Environ = os.environ) -> None: ...
def print_form(form: dict[str, Any]) -> None: ...
def print_directory() -> None: ...
def print_environ_usage() -> None: ...
@@ -85,7 +86,7 @@ class FieldStorage:
fp: IO[Any] | None = None,
headers: Mapping[str, str] | Message | None = None,
outerboundary: bytes = b"",
environ: SupportsContainsAndGetItem[str, str] = ...,
environ: SupportsContainsAndGetItem[str, str] = os.environ,
keep_blank_values: int = 0,
strict_parsing: int = 0,
limit: int | None = None,