diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 6b7d32080..39fc85191 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -645,7 +645,7 @@ class Tk(Misc, Wm): # Tk has __getattr__ so that tk_instance.foo falls back to tk_instance.tk.foo # Please keep in sync with _tkinter.TkappType call: Callable[..., Any] - eval: Callable[[str], str] + def eval(self, __code: str) -> str: ... adderrorinfo: Any createcommand: Any createfilehandler: Any diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 2fb874204..d3c882822 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -382,6 +382,7 @@ threading.Thread.__init__ timeit.main tkinter.Misc.grid_propagate tkinter.Misc.pack_propagate +tkinter.Tk.eval # from __getattr__ tkinter.Tk.report_callback_exception # A bit of a lie, since it's actually a method, but typing it as an attribute allows it to be assigned to tkinter.Wm.wm_iconphoto # Default value of argument can't be used without runtime error tkinter.font.Font.__getitem__ # Argument name differs (doesn't matter for __dunder__ methods)