@@ -80,8 +80,8 @@ class Directory(commondialog.Dialog):
80
80
# TODO: command kwarg available on macos
81
81
def asksaveasfilename (
82
82
* ,
83
- confirmoverwrite : bool | None = ... ,
84
- defaultextension : str | None = ... ,
83
+ confirmoverwrite : bool | None = True ,
84
+ defaultextension : str | None = "" ,
85
85
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
86
86
initialdir : StrOrBytesPath | None = ...,
87
87
initialfile : StrOrBytesPath | None = ...,
@@ -91,7 +91,7 @@ def asksaveasfilename(
91
91
) -> str : ... # can be empty string
92
92
def askopenfilename (
93
93
* ,
94
- defaultextension : str | None = ... ,
94
+ defaultextension : str | None = "" ,
95
95
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
96
96
initialdir : StrOrBytesPath | None = ...,
97
97
initialfile : StrOrBytesPath | None = ...,
@@ -101,7 +101,7 @@ def askopenfilename(
101
101
) -> str : ... # can be empty string
102
102
def askopenfilenames (
103
103
* ,
104
- defaultextension : str | None = ... ,
104
+ defaultextension : str | None = "" ,
105
105
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
106
106
initialdir : StrOrBytesPath | None = ...,
107
107
initialfile : StrOrBytesPath | None = ...,
@@ -110,15 +110,15 @@ def askopenfilenames(
110
110
typevariable : StringVar | str | None = ...,
111
111
) -> Literal ["" ] | tuple [str , ...]: ...
112
112
def askdirectory (
113
- * , initialdir : StrOrBytesPath | None = ..., mustexist : bool | None = ... , parent : Misc | None = ..., title : str | None = ...
113
+ * , initialdir : StrOrBytesPath | None = ..., mustexist : bool | None = False , parent : Misc | None = ..., title : str | None = ...
114
114
) -> str : ... # can be empty string
115
115
116
116
# TODO: If someone actually uses these, overload to have the actual return type of open(..., mode)
117
117
def asksaveasfile (
118
118
mode : str = "w" ,
119
119
* ,
120
- confirmoverwrite : bool | None = ... ,
121
- defaultextension : str | None = ... ,
120
+ confirmoverwrite : bool | None = True ,
121
+ defaultextension : str | None = "" ,
122
122
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
123
123
initialdir : StrOrBytesPath | None = ...,
124
124
initialfile : StrOrBytesPath | None = ...,
@@ -129,7 +129,7 @@ def asksaveasfile(
129
129
def askopenfile (
130
130
mode : str = "r" ,
131
131
* ,
132
- defaultextension : str | None = ... ,
132
+ defaultextension : str | None = "" ,
133
133
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
134
134
initialdir : StrOrBytesPath | None = ...,
135
135
initialfile : StrOrBytesPath | None = ...,
@@ -140,7 +140,7 @@ def askopenfile(
140
140
def askopenfiles (
141
141
mode : str = "r" ,
142
142
* ,
143
- defaultextension : str | None = ... ,
143
+ defaultextension : str | None = "" ,
144
144
filetypes : Iterable [tuple [str , str | list [str ] | tuple [str , ...]]] | None = ...,
145
145
initialdir : StrOrBytesPath | None = ...,
146
146
initialfile : StrOrBytesPath | None = ...,
0 commit comments