@@ -25,87 +25,75 @@ NO: Final = "no"
25
25
class Message (Dialog ):
26
26
command : ClassVar [str ]
27
27
28
- _Icon : TypeAlias = Literal ["error" , "info" , "question" , "warning" ]
29
- _Type : TypeAlias = Literal ["abortretryignore" , "ok" , "okcancel" , "retrycancel" , "yesno" , "yesnocancel" ]
30
- _Default : TypeAlias = Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ]
31
-
32
28
def showinfo (
33
29
title : str | None = None ,
34
30
message : str | None = None ,
35
31
* ,
36
32
detail : str = ...,
37
- icon : _Icon = ...,
38
- type : _Type = ...,
39
- default : _Default = ...,
33
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
34
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
40
35
parent : Misc = ...,
41
36
) -> str : ...
42
37
def showwarning (
43
38
title : str | None = None ,
44
39
message : str | None = None ,
45
40
* ,
46
41
detail : str = ...,
47
- icon : _Icon = ...,
48
- type : _Type = ...,
49
- default : _Default = ...,
42
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
43
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
50
44
parent : Misc = ...,
51
45
) -> str : ...
52
46
def showerror (
53
47
title : str | None = None ,
54
48
message : str | None = None ,
55
49
* ,
56
50
detail : str = ...,
57
- icon : _Icon = ...,
58
- type : _Type = ...,
59
- default : _Default = ...,
51
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
52
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
60
53
parent : Misc = ...,
61
54
) -> str : ...
62
55
def askquestion (
63
56
title : str | None = None ,
64
57
message : str | None = None ,
65
58
* ,
66
59
detail : str = ...,
67
- icon : _Icon = ...,
68
- type : _Type = ...,
69
- default : _Default = ...,
60
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
61
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
70
62
parent : Misc = ...,
71
63
) -> str : ...
72
64
def askokcancel (
73
65
title : str | None = None ,
74
66
message : str | None = None ,
75
67
* ,
76
68
detail : str = ...,
77
- icon : _Icon = ...,
78
- type : _Type = ...,
79
- default : _Default = ...,
69
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
70
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
80
71
parent : Misc = ...,
81
72
) -> bool : ...
82
73
def askyesno (
83
74
title : str | None = None ,
84
75
message : str | None = None ,
85
76
* ,
86
77
detail : str = ...,
87
- icon : _Icon = ...,
88
- type : _Type = ...,
89
- default : _Default = ...,
78
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
79
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
90
80
parent : Misc = ...,
91
81
) -> bool : ...
92
82
def askyesnocancel (
93
83
title : str | None = None ,
94
84
message : str | None = None ,
95
85
* ,
96
86
detail : str = ...,
97
- icon : _Icon = ...,
98
- type : _Type = ...,
99
- default : _Default = ...,
87
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
88
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
100
89
parent : Misc = ...,
101
90
) -> bool | None : ...
102
91
def askretrycancel (
103
92
title : str | None = None ,
104
93
message : str | None = None ,
105
94
* ,
106
95
detail : str = ...,
107
- icon : _Icon = ...,
108
- type : _Type = ...,
109
- default : _Default = ...,
96
+ icon : Literal ["error" , "info" , "question" , "warning" ] = ...,
97
+ default : Literal ["abort" , "retry" , "ignore" , "ok" , "cancel" , "yes" , "no" ] = ...,
110
98
parent : Misc = ...,
111
99
) -> bool : ...
0 commit comments