Skip to content

Commit 94b1880

Browse files
Fix some incorrect parameter defaults in the stdlib (#14620)
1 parent cc14cc6 commit 94b1880

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

stdlib/distutils/file_util.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def copy_file(
2929
) -> tuple[_BytesPathT | bytes, bool]: ...
3030
@overload
3131
def move_file(
32-
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
32+
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0
3333
) -> _StrPathT | str: ...
3434
@overload
3535
def move_file(
36-
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
36+
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0
3737
) -> _BytesPathT | bytes: ...
3838
def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ...

stdlib/gettext.pyi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ else:
120120
languages: Iterable[str] | None = None,
121121
class_: None = None,
122122
fallback: Literal[False] = False,
123-
codeset: str | None = None,
123+
codeset: str | None = ...,
124124
) -> GNUTranslations: ...
125125
@overload
126126
def translation(
@@ -130,7 +130,7 @@ else:
130130
*,
131131
class_: Callable[[io.BufferedReader], _NullTranslationsT],
132132
fallback: Literal[False] = False,
133-
codeset: str | None = None,
133+
codeset: str | None = ...,
134134
) -> _NullTranslationsT: ...
135135
@overload
136136
def translation(
@@ -139,7 +139,7 @@ else:
139139
languages: Iterable[str] | None,
140140
class_: Callable[[io.BufferedReader], _NullTranslationsT],
141141
fallback: Literal[False] = False,
142-
codeset: str | None = None,
142+
codeset: str | None = ...,
143143
) -> _NullTranslationsT: ...
144144
@overload
145145
def translation(
@@ -148,18 +148,18 @@ else:
148148
languages: Iterable[str] | None = None,
149149
class_: Callable[[io.BufferedReader], NullTranslations] | None = None,
150150
fallback: bool = False,
151-
codeset: str | None = None,
151+
codeset: str | None = ...,
152152
) -> NullTranslations: ...
153153
@overload
154-
def install(
155-
domain: str, localedir: StrPath | None = None, codeset: None = None, names: Container[str] | None = None
156-
) -> None: ...
154+
def install(domain: str, localedir: StrPath | None = None, names: Container[str] | None = None) -> None: ...
157155
@overload
158156
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
159-
def install(domain: str, localedir: StrPath | None, codeset: str, /, names: Container[str] | None = None) -> None: ...
157+
def install(domain: str, localedir: StrPath | None, codeset: str | None, /, names: Container[str] | None = None) -> None: ...
160158
@overload
161159
@deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.")
162-
def install(domain: str, localedir: StrPath | None = None, *, codeset: str, names: Container[str] | None = None) -> None: ...
160+
def install(
161+
domain: str, localedir: StrPath | None = None, *, codeset: str | None, names: Container[str] | None = None
162+
) -> None: ...
163163

164164
def textdomain(domain: str | None = None) -> str: ...
165165
def bindtextdomain(domain: str, localedir: StrPath | None = None) -> str: ...

stdlib/tkinter/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3475,7 +3475,7 @@ class Text(Widget, XView, YView):
34753475
def image_configure(
34763476
self,
34773477
index: _TextIndex,
3478-
cnf: dict[str, Any] | None = {},
3478+
cnf: dict[str, Any] | None = None,
34793479
*,
34803480
align: Literal["baseline", "bottom", "center", "top"] = ...,
34813481
image: _ImageSpec = ...,

0 commit comments

Comments
 (0)