more tkinter types (#4921)

This commit is contained in:
Akuli
2021-01-09 20:20:52 +02:00
committed by GitHub
parent 599ce2969b
commit 64c6ef77c7

View File

@@ -12,9 +12,9 @@ from typing_extensions import Literal, TypedDict
# unfortunately not much can be done about it. https://github.com/python/typeshed/pull/4346
TclError = _tkinter.TclError
wantobjects: Any
TkVersion: Any
TclVersion: Any
wantobjects: int
TkVersion: float
TclVersion: float
READABLE = _tkinter.READABLE
WRITABLE = _tkinter.WRITABLE
EXCEPTION = _tkinter.EXCEPTION
@@ -211,7 +211,7 @@ class BooleanVar(Variable):
initialize = set
def get(self) -> bool: ...
def mainloop(n: int = ...): ...
def mainloop(n: int = ...) -> None: ...
getint: Any
getdouble: Any
@@ -227,10 +227,10 @@ class Misc:
def tk_strictMotif(self, boolean: Optional[Any] = ...): ...
def tk_bisque(self): ...
def tk_setPalette(self, *args, **kw): ...
def wait_variable(self, name: Union[str, Variable] = ...): ...
waitvar: Any
def wait_window(self, window: Optional[Any] = ...): ...
def wait_visibility(self, window: Optional[Any] = ...): ...
def wait_variable(self, name: Union[str, Variable] = ...) -> None: ...
waitvar = wait_variable
def wait_window(self, window: Optional[Misc] = ...) -> None: ...
def wait_visibility(self, window: Optional[Misc] = ...) -> None: ...
def setvar(self, name: str = ..., value: str = ...): ...
def getvar(self, name: str = ...): ...
def getint(self, s): ...
@@ -273,7 +273,7 @@ class Misc:
def send(self, interp, cmd, *args): ...
def lower(self, belowThis: Optional[Any] = ...): ...
def tkraise(self, aboveThis: Optional[Any] = ...): ...
lift: Any
lift = tkraise
def winfo_atom(self, name: str, displayof: Union[Literal[0], Misc, None] = ...): ...
def winfo_atomname(self, id: int, displayof: Union[Literal[0], Misc, None] = ...): ...
def winfo_cells(self) -> int: ...
@@ -323,8 +323,8 @@ class Misc:
def winfo_width(self) -> int: ...
def winfo_x(self) -> int: ...
def winfo_y(self) -> int: ...
def update(self): ...
def update_idletasks(self): ...
def update(self) -> None: ...
def update_idletasks(self) -> None: ...
def bindtags(self, tagList: Optional[Any] = ...): ...
# bind with isinstance(func, str) doesn't return anything, but all other
# binds do. The default value of func is not str.
@@ -367,7 +367,7 @@ class Misc:
def unbind(self, sequence: str, funcid: Optional[str] = ...) -> None: ...
def unbind_all(self, sequence: str) -> None: ...
def unbind_class(self, className: str, sequence: str) -> None: ...
def mainloop(self, n: int = ...): ...
def mainloop(self, n: int = ...) -> None: ...
def quit(self): ...
def nametowidget(self, name: Union[str, Misc, _tkinter.Tcl_Obj]) -> Any: ...
register: Any