typeshed
typeshed copied to clipboard
The tkinter.filedialog module has no default values for arguments
https://github.com/python/typeshed/blob/6d20ea636ca7b66cec62f490ec9e42b63886c811/stdlib/tkinter/filedialog.pyi#L81-L90
The defaults are set to ..., because the code is dynamic (as is usual with tkinter), and the default values couldn't be filled in automatically when we introduced default values to typeshed. Setting reasonable default values would make the parameters easier to use, because IDEs tell you what each parameter does if you don't specify it.
This is similar to #10947, maybe a part of it.
easily fixable, but I would need to know what could the default values be
I would look at tkinter's source code. It calls Tcl commands (like everything else in tkinter), in this case tk_getOpenFile, tk_getSaveFile and tk_chooseDirectory. Here are their manual pages that explain in detail how they work:
- tk_getOpenFile and tk_getSaveFile (same manual page)
- tk_chooseDirectory
You can also just try and see what each parameter does.
confirmoverwrite default is True in Windows 10. The filepicker produces a dialog to confirm saving to an already existing filename.
Still some defaults missing.