Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/@tests/test_cases/check_tkinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def foo(x: int, y: str) -> None:
root.after(1000, foo, 10, "lol")
root.after(1000, foo, 10, 10) # type: ignore

tkinter.OptionMenu(root, tkinter.StringVar(), "option", command=lambda value: assert_type(value, str))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since our tests are never run, they are only checked against type checkers, this test doesn't do much. We try to keep our tests minimal, so this isn't needed.



# Font size must be integer
label = tkinter.Label()
Expand Down
4 changes: 2 additions & 2 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3905,7 +3905,7 @@ class OptionMenu(Menubutton):
variable: StringVar,
value: str,
*values: str,
command: Callable[[StringVar], object] | None = ...,
command: Callable[[str], object] | None = ...,
name: str | None = None,
) -> None: ...
else:
Expand All @@ -3916,7 +3916,7 @@ class OptionMenu(Menubutton):
variable: StringVar,
value: str,
*values: str,
command: Callable[[StringVar], object] | None = ...,
command: Callable[[str], object] | None = ...,
) -> None: ...
# configure, config, cget are inherited from Menubutton
# destroy and __getitem__ are overridden, signature does not change
Expand Down