Skip to content
Open
Changes from all 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
78 changes: 41 additions & 37 deletions stdlib/tkinter/filedialog.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -80,35 +80,39 @@ def asksaveasfilename(
*,
confirmoverwrite: bool | None = True,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> str: ... # can be empty string
def askopenfilename(
*,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> str: ... # can be empty string
def askopenfilenames(
*,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> Literal[""] | tuple[str, ...]: ...
def askdirectory(
*, initialdir: StrOrBytesPath | None = ..., mustexist: bool | None = False, parent: Misc | None = ..., title: str | None = ...
*,
initialdir: StrOrBytesPath | None = None,
mustexist: bool | None = False,
parent: Misc | None = None,
title: str | None = None,
) -> str: ... # can be empty string

# TODO: If someone actually uses these, overload to have the actual return type of open(..., mode)
Expand All @@ -117,33 +121,33 @@ def asksaveasfile(
*,
confirmoverwrite: bool | None = True,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> IO[Incomplete] | None: ...
def askopenfile(
mode: str = "r",
*,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> IO[Incomplete] | None: ...
def askopenfiles(
mode: str = "r",
*,
defaultextension: str | None = "",
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
initialdir: StrOrBytesPath | None = ...,
initialfile: StrOrBytesPath | None = ...,
parent: Misc | None = ...,
title: str | None = ...,
typevariable: StringVar | str | None = ...,
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] = (),
initialdir: StrOrBytesPath | None = None,
initialfile: StrOrBytesPath | None = None,
parent: Misc | None = None,
title: str | None = None,
typevariable: StringVar | str | None = None,
) -> tuple[IO[Incomplete], ...]: ... # can be empty tuple
def test() -> None: ...
Loading