1+ from tkinter import Misc
12from tkinter .commondialog import Dialog
2- from typing import ClassVar , Final
3+ from typing import ClassVar , Final , Literal
34
45__all__ = ["showinfo" , "showwarning" , "showerror" , "askquestion" , "askokcancel" , "askyesno" , "askyesnocancel" , "askretrycancel" ]
56
@@ -23,11 +24,75 @@ NO: Final = "no"
2324class Message (Dialog ):
2425 command : ClassVar [str ]
2526
26- def showinfo (title : str | None = None , message : str | None = None , ** options ) -> str : ...
27- def showwarning (title : str | None = None , message : str | None = None , ** options ) -> str : ...
28- def showerror (title : str | None = None , message : str | None = None , ** options ) -> str : ...
29- def askquestion (title : str | None = None , message : str | None = None , ** options ) -> str : ...
30- def askokcancel (title : str | None = None , message : str | None = None , ** options ) -> bool : ...
31- def askyesno (title : str | None = None , message : str | None = None , ** options ) -> bool : ...
32- def askyesnocancel (title : str | None = None , message : str | None = None , ** options ) -> bool | None : ...
33- def askretrycancel (title : str | None = None , message : str | None = None , ** options ) -> bool : ...
27+ def showinfo (
28+ title : str | None = None ,
29+ message : str | None = None ,
30+ * ,
31+ detail : str = ...,
32+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
33+ default : Literal ["ok" ] = ...,
34+ parent : Misc = ...,
35+ ) -> str : ...
36+ def showwarning (
37+ title : str | None = None ,
38+ message : str | None = None ,
39+ * ,
40+ detail : str = ...,
41+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
42+ default : Literal ["ok" ] = ...,
43+ parent : Misc = ...,
44+ ) -> str : ...
45+ def showerror (
46+ title : str | None = None ,
47+ message : str | None = None ,
48+ * ,
49+ detail : str = ...,
50+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
51+ default : Literal ["ok" ] = ...,
52+ parent : Misc = ...,
53+ ) -> str : ...
54+ def askquestion (
55+ title : str | None = None ,
56+ message : str | None = None ,
57+ * ,
58+ detail : str = ...,
59+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
60+ default : Literal ["yes" , "no" ] = ...,
61+ parent : Misc = ...,
62+ ) -> str : ...
63+ def askokcancel (
64+ title : str | None = None ,
65+ message : str | None = None ,
66+ * ,
67+ detail : str = ...,
68+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
69+ default : Literal ["ok" , "cancel" ] = ...,
70+ parent : Misc = ...,
71+ ) -> bool : ...
72+ def askyesno (
73+ title : str | None = None ,
74+ message : str | None = None ,
75+ * ,
76+ detail : str = ...,
77+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
78+ default : Literal ["yes" , "no" ] = ...,
79+ parent : Misc = ...,
80+ ) -> bool : ...
81+ def askyesnocancel (
82+ title : str | None = None ,
83+ message : str | None = None ,
84+ * ,
85+ detail : str = ...,
86+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
87+ default : Literal ["cancel" , "yes" , "no" ] = ...,
88+ parent : Misc = ...,
89+ ) -> bool | None : ...
90+ def askretrycancel (
91+ title : str | None = None ,
92+ message : str | None = None ,
93+ * ,
94+ detail : str = ...,
95+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
96+ default : Literal ["retry" , "cancel" ] = ...,
97+ parent : Misc = ...,
98+ ) -> bool : ...
0 commit comments