fix eval and call return types (#4451)

This commit is contained in:
Akuli
2020-08-16 22:30:04 +03:00
committed by GitHub
parent b438ccc3bc
commit 0ebe4c2b65
2 changed files with 4 additions and 4 deletions

View File

@@ -38,8 +38,8 @@ class TclError(Exception): ...
# Tkapp_UnicodeResult, and it returns a string when it succeeds.
class TkappType:
# Please keep in sync with tkinter.Tk
def call(self, __command: Union[str, Tuple[Any, ...]], *args: Any) -> str: ...
def eval(self, __script: str) -> Any: ...
def call(self, __command: Union[str, Tuple[Any, ...]], *args: Any) -> Any: ...
def eval(self, __script: str) -> str: ...
adderrorinfo: Any
createcommand: Any
createfilehandler: Any

View File

@@ -448,8 +448,8 @@ class Tk(Misc, Wm):
report_callback_exception: Callable[[Type[BaseException], BaseException, TracebackType], Any]
# Tk has __getattr__ so that tk_instance.foo falls back to tk_instance.tk.foo
# Please keep in sync with _tkinter.TkappType
call: Callable[..., str]
eval: Callable[[str], Any]
call: Callable[..., Any]
eval: Callable[[str], str]
adderrorinfo: Any
createcommand: Any
createfilehandler: Any