python / python/typeshed

The tkinter.filedialog module has no default values for arguments

Open
#11,482 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: tkinter
Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open stdlib/tkinter/filedialog.pyi and inspect lines 81-90, then review the related issue #10947 for context on default values in typeshed. The work is done when the relevant arguments have reasonable defaults instead of ellipses and the stub remains consistent with the dynamic tkinter API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.