mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-16 11:34:56 +08:00
Improve _tkinter (#6908)
This commit is contained in:
@@ -17,8 +17,15 @@ from typing_extensions import Literal, final
|
||||
# (<textindex object: '1.0'>, <textindex object: '2.0'>)
|
||||
@final
|
||||
class Tcl_Obj:
|
||||
string: str # str(tclobj) returns this
|
||||
string: str | bytes
|
||||
typename: str
|
||||
__hash__: None # type: ignore[assignment]
|
||||
def __eq__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
|
||||
class TclError(Exception): ...
|
||||
|
||||
@@ -42,39 +49,40 @@ class TclError(Exception): ...
|
||||
@final
|
||||
class TkappType:
|
||||
# Please keep in sync with tkinter.Tk
|
||||
def adderrorinfo(self, __msg): ...
|
||||
def call(self, __command: Any, *args: Any) -> Any: ...
|
||||
def createcommand(self, __name, __func): ...
|
||||
if sys.platform != "win32":
|
||||
def createfilehandler(self, __file, __mask, __func): ...
|
||||
def deletefilehandler(self, __file): ...
|
||||
def createtimerhandler(self, __milliseconds, __func): ...
|
||||
def deletecommand(self, __name): ...
|
||||
def dooneevent(self, __flags: int = ...): ...
|
||||
def eval(self, __script: str) -> str: ...
|
||||
adderrorinfo: Any
|
||||
createcommand: Any
|
||||
createfilehandler: Any
|
||||
createtimerhandler: Any
|
||||
deletecommand: Any
|
||||
deletefilehandler: Any
|
||||
dooneevent: Any
|
||||
evalfile: Any
|
||||
exprboolean: Any
|
||||
exprdouble: Any
|
||||
exprlong: Any
|
||||
exprstring: Any
|
||||
getboolean: Any
|
||||
getdouble: Any
|
||||
getint: Any
|
||||
getvar: Any
|
||||
globalgetvar: Any
|
||||
globalsetvar: Any
|
||||
globalunsetvar: Any
|
||||
interpaddr: Any
|
||||
loadtk: Any
|
||||
mainloop: Any
|
||||
quit: Any
|
||||
record: Any
|
||||
setvar: Any
|
||||
def evalfile(self, __fileName): ...
|
||||
def exprboolean(self, __s): ...
|
||||
def exprdouble(self, __s): ...
|
||||
def exprlong(self, __s): ...
|
||||
def exprstring(self, __s): ...
|
||||
def getboolean(self, __arg): ...
|
||||
def getdouble(self, __arg): ...
|
||||
def getint(self, __arg): ...
|
||||
def getvar(self, *args, **kwargs): ...
|
||||
def globalgetvar(self, *args, **kwargs): ...
|
||||
def globalsetvar(self, *args, **kwargs): ...
|
||||
def globalunsetvar(self, *args, **kwargs): ...
|
||||
def interpaddr(self): ...
|
||||
def loadtk(self) -> None: ...
|
||||
def mainloop(self, __threshold: int = ...): ...
|
||||
def quit(self): ...
|
||||
def record(self, __script): ...
|
||||
def setvar(self, *ags, **kwargs): ...
|
||||
if sys.version_info < (3, 11):
|
||||
split: Any
|
||||
splitlist: Any
|
||||
unsetvar: Any
|
||||
wantobjects: Any
|
||||
willdispatch: Any
|
||||
def split(self, __arg): ...
|
||||
def splitlist(self, __arg): ...
|
||||
def unsetvar(self, *args, **kwargs): ...
|
||||
def wantobjects(self, *args, **kwargs): ...
|
||||
def willdispatch(self): ...
|
||||
|
||||
# These should be kept in sync with tkinter.tix constants, except ALL_EVENTS which doesn't match TCL_ALL_EVENTS
|
||||
ALL_EVENTS: Literal[-3]
|
||||
@@ -91,9 +99,18 @@ WRITABLE: Literal[4]
|
||||
TCL_VERSION: str
|
||||
TK_VERSION: str
|
||||
|
||||
# TODO: figure out what these are (with e.g. help()) and get rid of Any
|
||||
TkttType: Any
|
||||
_flatten: Any
|
||||
create: Any
|
||||
getbusywaitinterval: Any
|
||||
setbusywaitinterval: Any
|
||||
class TkttType:
|
||||
def deletetimerhandler(self): ...
|
||||
|
||||
def create(
|
||||
__screenName: str | None = ...,
|
||||
__baseName: str | None = ...,
|
||||
__className: str = ...,
|
||||
__interactive: bool = ...,
|
||||
__wantobjects: bool = ...,
|
||||
__wantTk: bool = ...,
|
||||
__sync: bool = ...,
|
||||
__use: str | None = ...,
|
||||
): ...
|
||||
def getbusywaitinterval(): ...
|
||||
def setbusywaitinterval(__new_val): ...
|
||||
|
||||
Reference in New Issue
Block a user