Fix some incorrect parameter defaults in the stdlib (#14620)

This commit is contained in:
Jelle Zijlstra
2025-08-22 09:11:52 -07:00
committed by GitHub
parent cc14cc6c2a
commit 94b1880444
3 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -29,10 +29,10 @@ def copy_file(
) -> tuple[_BytesPathT | bytes, bool]: ...
@overload
def move_file(
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0
) -> _StrPathT | str: ...
@overload
def move_file(
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0
) -> _BytesPathT | bytes: ...
def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ...
+11 -11
View File
@@ -120,7 +120,7 @@ else:
languages: Iterable[str] | None = None,
class_: None = None,
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str | None = ...,
) -> GNUTranslations: ...
@overload
def translation(
@@ -130,7 +130,7 @@ else:
*,
class_: Callable[[io.BufferedReader], _NullTranslationsT],
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str | None = ...,
) -> _NullTranslationsT: ...
@overload
def translation(
@@ -139,7 +139,7 @@ else:
languages: Iterable[str] | None,
class_: Callable[[io.BufferedReader], _NullTranslationsT],
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str | None = ...,
) -> _NullTranslationsT: ...
@overload
def translation(
@@ -148,18 +148,18 @@ else:
languages: Iterable[str] | None = None,
class_: Callable[[io.BufferedReader], NullTranslations] | None = None,
fallback: bool = False,
codeset: str | None = None,
codeset: str | None = ...,
) -> NullTranslations: ...
@overload
def install(domain: str, localedir: StrPath | None = None, names: Container[str] | None = None) -> None: ...
@overload
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
def install(domain: str, localedir: StrPath | None, codeset: str | None, /, names: Container[str] | None = None) -> None: ...
@overload
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
def install(
domain: str, localedir: StrPath | None = None, codeset: None = None, names: Container[str] | None = None
domain: str, localedir: StrPath | None = None, *, codeset: str | None, names: Container[str] | None = None
) -> None: ...
@overload
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
def install(domain: str, localedir: StrPath | None, codeset: str, /, names: Container[str] | None = None) -> None: ...
@overload
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
def install(domain: str, localedir: StrPath | None = None, *, codeset: str, names: Container[str] | None = None) -> None: ...
def textdomain(domain: str | None = None) -> str: ...
def bindtextdomain(domain: str, localedir: StrPath | None = None) -> str: ...
+1 -1
View File
@@ -3475,7 +3475,7 @@ class Text(Widget, XView, YView):
def image_configure(
self,
index: _TextIndex,
cnf: dict[str, Any] | None = {},
cnf: dict[str, Any] | None = None,
*,
align: Literal["baseline", "bottom", "center", "top"] = ...,
image: _ImageSpec = ...,