Skip to content

Fix some incorrect parameter defaults in the stdlib #14620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 22, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/distutils/file_util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
12 changes: 5 additions & 7 deletions stdlib/gettext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ else:
languages: Iterable[str] | None = None,
class_: None = None,
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str = ...,
) -> GNUTranslations: ...
@overload
def translation(
Expand All @@ -130,7 +130,7 @@ else:
*,
class_: Callable[[io.BufferedReader], _NullTranslationsT],
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str = ...,
) -> _NullTranslationsT: ...
@overload
def translation(
Expand All @@ -139,7 +139,7 @@ else:
languages: Iterable[str] | None,
class_: Callable[[io.BufferedReader], _NullTranslationsT],
fallback: Literal[False] = False,
codeset: str | None = None,
codeset: str = ...,
) -> _NullTranslationsT: ...
@overload
def translation(
Expand All @@ -148,12 +148,10 @@ else:
languages: Iterable[str] | None = None,
class_: Callable[[io.BufferedReader], NullTranslations] | None = None,
fallback: bool = False,
codeset: str | None = None,
codeset: str = ...,
) -> NullTranslations: ...
@overload
def install(
domain: str, localedir: StrPath | None = None, codeset: None = None, names: Container[str] | None = None
) -> None: ...
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, /, names: Container[str] | None = None) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ...,
Expand Down
Loading