diff --git a/typings/sublime.pyi b/typings/sublime.pyi index 57b9788..f257e04 100644 --- a/typings/sublime.pyi +++ b/typings/sublime.pyi @@ -17,6 +17,7 @@ from typing import ( Sequence, Tuple, TypeVar, + overload, ) from _sublime_types import ( @@ -266,6 +267,40 @@ def yes_no_cancel_dialog(msg: str, yes_title: str = "", no_title: str = "", titl ... +@overload +def open_dialog( + callback: Callable[[None | Sequence[str]], None], + file_types: Sequence[Tuple[str, Sequence[str]]], + directory: None | str, + multi_select: Literal[True], + allow_folders: bool = False, +) -> None: + ... + + +@overload +def open_dialog( + callback: Callable[[None | Sequence[str]], None], + file_types: Sequence[Tuple[str, Sequence[str]]] = [], + directory: None | str = None, + allow_folders: bool = False, + *, + multi_select: Literal[True], +) -> None: + ... + + +@overload +def open_dialog( + callback: Callable[[None | str], None], + file_types: Sequence[Tuple[str, Sequence[str]]] = [], + directory: None | str = None, + multi_select: bool = False, + allow_folders: bool = False, +) -> None: + ... + + def open_dialog( callback: Callable[[None | str | Sequence[str]], None], file_types: Sequence[Tuple[str, Sequence[str]]] = [],