mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -186,7 +186,7 @@ class Variable:
|
||||
def get(self) -> Any: ...
|
||||
def trace_add(self, mode: _TraceMode, callback: Callable[[str, str, str], Any]) -> str: ...
|
||||
def trace_remove(self, mode: _TraceMode, cbname: str) -> None: ...
|
||||
def trace_info(self) -> list[Tuple[Tuple[_TraceMode, ...], str]]: ...
|
||||
def trace_info(self) -> list[tuple[Tuple[_TraceMode, ...], str]]: ...
|
||||
def trace_variable(self, mode, callback): ... # deprecated
|
||||
def trace_vdelete(self, mode, cbname): ... # deprecated
|
||||
def trace_vinfo(self): ... # deprecated
|
||||
@@ -306,11 +306,11 @@ class Misc:
|
||||
def winfo_pathname(self, id: int, displayof: Literal[0] | Misc | None = ...): ...
|
||||
def winfo_pixels(self, number: _ScreenUnits) -> int: ...
|
||||
def winfo_pointerx(self) -> int: ...
|
||||
def winfo_pointerxy(self) -> Tuple[int, int]: ...
|
||||
def winfo_pointerxy(self) -> tuple[int, int]: ...
|
||||
def winfo_pointery(self) -> int: ...
|
||||
def winfo_reqheight(self) -> int: ...
|
||||
def winfo_reqwidth(self) -> int: ...
|
||||
def winfo_rgb(self, color: _Color) -> Tuple[int, int, int]: ...
|
||||
def winfo_rgb(self, color: _Color) -> tuple[int, int, int]: ...
|
||||
def winfo_rootx(self) -> int: ...
|
||||
def winfo_rooty(self) -> int: ...
|
||||
def winfo_screen(self) -> str: ...
|
||||
@@ -326,7 +326,7 @@ class Misc:
|
||||
def winfo_viewable(self) -> bool: ...
|
||||
def winfo_visual(self) -> str: ...
|
||||
def winfo_visualid(self) -> str: ...
|
||||
def winfo_visualsavailable(self, includeids: int = ...) -> list[Tuple[str, int]]: ...
|
||||
def winfo_visualsavailable(self, includeids: int = ...) -> list[tuple[str, int]]: ...
|
||||
def winfo_vrootheight(self) -> int: ...
|
||||
def winfo_vrootwidth(self) -> int: ...
|
||||
def winfo_vrootx(self) -> int: ...
|
||||
@@ -385,11 +385,11 @@ class Misc:
|
||||
@overload
|
||||
def grid_bbox(
|
||||
self, column: None = ..., row: None = ..., col2: None = ..., row2: None = ...
|
||||
) -> Tuple[int, int, int, int] | None: ...
|
||||
) -> tuple[int, int, int, int] | None: ...
|
||||
@overload
|
||||
def grid_bbox(self, column: int, row: int, col2: None = ..., row2: None = ...) -> Tuple[int, int, int, int] | None: ...
|
||||
def grid_bbox(self, column: int, row: int, col2: None = ..., row2: None = ...) -> tuple[int, int, int, int] | None: ...
|
||||
@overload
|
||||
def grid_bbox(self, column: int, row: int, col2: int, row2: int) -> Tuple[int, int, int, int] | None: ...
|
||||
def grid_bbox(self, column: int, row: int, col2: int, row2: int) -> tuple[int, int, int, int] | None: ...
|
||||
bbox = grid_bbox
|
||||
def grid_columnconfigure(
|
||||
self,
|
||||
@@ -413,12 +413,12 @@ class Misc:
|
||||
) -> _GridIndexInfo | Any: ... # can be None but annoyying to check
|
||||
columnconfigure = grid_columnconfigure
|
||||
rowconfigure = grid_rowconfigure
|
||||
def grid_location(self, x: _ScreenUnits, y: _ScreenUnits) -> Tuple[int, int]: ...
|
||||
def grid_location(self, x: _ScreenUnits, y: _ScreenUnits) -> tuple[int, int]: ...
|
||||
@overload
|
||||
def grid_propagate(self, flag: bool) -> None: ...
|
||||
@overload
|
||||
def grid_propagate(self) -> bool: ...
|
||||
def grid_size(self) -> Tuple[int, int]: ...
|
||||
def grid_size(self) -> tuple[int, int]: ...
|
||||
size = grid_size
|
||||
# Widget because Toplevel or Tk is never a slave
|
||||
def pack_slaves(self) -> list[Widget]: ...
|
||||
@@ -478,7 +478,7 @@ class CallWrapper:
|
||||
|
||||
class XView:
|
||||
@overload
|
||||
def xview(self) -> Tuple[float, float]: ...
|
||||
def xview(self) -> tuple[float, float]: ...
|
||||
@overload
|
||||
def xview(self, *args: Any) -> Any: ...
|
||||
def xview_moveto(self, fraction: float) -> None: ...
|
||||
@@ -489,7 +489,7 @@ class XView:
|
||||
|
||||
class YView:
|
||||
@overload
|
||||
def yview(self) -> Tuple[float, float]: ...
|
||||
def yview(self) -> tuple[float, float]: ...
|
||||
@overload
|
||||
def yview(self, *args: Any) -> Any: ...
|
||||
def yview_moveto(self, fraction: float) -> None: ...
|
||||
@@ -504,7 +504,7 @@ class Wm:
|
||||
@overload
|
||||
def wm_aspect(
|
||||
self, minNumer: None = ..., minDenom: None = ..., maxNumer: None = ..., maxDenom: None = ...
|
||||
) -> Tuple[int, int, int, int] | None: ...
|
||||
) -> tuple[int, int, int, int] | None: ...
|
||||
aspect = wm_aspect
|
||||
@overload
|
||||
def wm_attributes(self) -> Tuple[Any, ...]: ...
|
||||
@@ -561,12 +561,12 @@ class Wm:
|
||||
def wm_manage(self, widget): ...
|
||||
manage = wm_manage
|
||||
@overload
|
||||
def wm_maxsize(self, width: None = ..., height: None = ...) -> Tuple[int, int]: ...
|
||||
def wm_maxsize(self, width: None = ..., height: None = ...) -> tuple[int, int]: ...
|
||||
@overload
|
||||
def wm_maxsize(self, width: int, height: int) -> None: ...
|
||||
maxsize = wm_maxsize
|
||||
@overload
|
||||
def wm_minsize(self, width: None = ..., height: None = ...) -> Tuple[int, int]: ...
|
||||
def wm_minsize(self, width: None = ..., height: None = ...) -> tuple[int, int]: ...
|
||||
@overload
|
||||
def wm_minsize(self, width: int, height: int) -> None: ...
|
||||
minsize = wm_minsize
|
||||
@@ -585,7 +585,7 @@ class Wm:
|
||||
def wm_protocol(self, name: None = ..., func: None = ...) -> Tuple[str, ...]: ...
|
||||
protocol = wm_protocol
|
||||
@overload
|
||||
def wm_resizable(self, width: None = ..., height: None = ...) -> Tuple[bool, bool]: ...
|
||||
def wm_resizable(self, width: None = ..., height: None = ...) -> tuple[bool, bool]: ...
|
||||
@overload
|
||||
def wm_resizable(self, width: bool, height: bool) -> None: ...
|
||||
resizable = wm_resizable
|
||||
@@ -645,9 +645,9 @@ class Tk(Misc, Wm):
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def loadtk(self) -> None: ... # differs from _tkinter.TkappType.loadtk
|
||||
def destroy(self) -> None: ...
|
||||
@@ -702,8 +702,8 @@ class _PackInfo(_InMiscTotal):
|
||||
# can be specified in pack().
|
||||
ipadx: int
|
||||
ipady: int
|
||||
padx: int | Tuple[int, int]
|
||||
pady: int | Tuple[int, int]
|
||||
padx: int | tuple[int, int]
|
||||
pady: int | tuple[int, int]
|
||||
|
||||
class Pack:
|
||||
# _PackInfo is not the valid type for cnf because pad stuff accepts any
|
||||
@@ -722,8 +722,8 @@ class Pack:
|
||||
side: Literal["left", "right", "top", "bottom"] = ...,
|
||||
ipadx: _ScreenUnits = ...,
|
||||
ipady: _ScreenUnits = ...,
|
||||
padx: _ScreenUnits | Tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
pady: _ScreenUnits | Tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
padx: _ScreenUnits | tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
pady: _ScreenUnits | tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
in_: Misc = ...,
|
||||
**kw: Any, # allow keyword argument named 'in', see #4836
|
||||
) -> None: ...
|
||||
@@ -791,8 +791,8 @@ class _GridInfo(_InMiscNonTotal): # empty dict if widget hasn't been gridded
|
||||
rowspan: int
|
||||
ipadx: int
|
||||
ipady: int
|
||||
padx: int | Tuple[int, int]
|
||||
pady: int | Tuple[int, int]
|
||||
padx: int | tuple[int, int]
|
||||
pady: int | tuple[int, int]
|
||||
sticky: str # consists of letters 'n', 's', 'w', 'e', no repeats, may be empty
|
||||
|
||||
class Grid:
|
||||
@@ -806,8 +806,8 @@ class Grid:
|
||||
rowspan: int = ...,
|
||||
ipadx: _ScreenUnits = ...,
|
||||
ipady: _ScreenUnits = ...,
|
||||
padx: _ScreenUnits | Tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
pady: _ScreenUnits | Tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
padx: _ScreenUnits | tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
pady: _ScreenUnits | tuple[_ScreenUnits, _ScreenUnits] = ...,
|
||||
sticky: str = ..., # consists of letters 'n', 's', 'w', 'e', may contain repeats, may be empty
|
||||
in_: Misc = ...,
|
||||
**kw: Any, # allow keyword argument named 'in', see #4836
|
||||
@@ -887,7 +887,7 @@ class Toplevel(BaseWidget, Wm):
|
||||
screen: str = ..., # can't be changed after creating widget
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
use: int = ...,
|
||||
visual: str | Tuple[str, int] = ...,
|
||||
visual: str | tuple[str, int] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
@@ -911,9 +911,9 @@ class Toplevel(BaseWidget, Wm):
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Button(Widget):
|
||||
@@ -1006,9 +1006,9 @@ class Button(Widget):
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
wraplength: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def flash(self): ...
|
||||
def invoke(self) -> Any: ...
|
||||
@@ -1043,7 +1043,7 @@ class Canvas(Widget, XView, YView):
|
||||
relief: _Relief = ...,
|
||||
# Setting scrollregion to None doesn't reset it back to empty,
|
||||
# but setting it to () does.
|
||||
scrollregion: Tuple[_ScreenUnits, _ScreenUnits, _ScreenUnits, _ScreenUnits] | Tuple[()] = ...,
|
||||
scrollregion: tuple[_ScreenUnits, _ScreenUnits, _ScreenUnits, _ScreenUnits] | tuple[()] = ...,
|
||||
selectbackground: _Color = ...,
|
||||
selectborderwidth: _ScreenUnits = ...,
|
||||
selectforeground: _Color = ...,
|
||||
@@ -1080,7 +1080,7 @@ class Canvas(Widget, XView, YView):
|
||||
insertwidth: _ScreenUnits = ...,
|
||||
offset: Any = ..., # undocumented
|
||||
relief: _Relief = ...,
|
||||
scrollregion: Tuple[_ScreenUnits, _ScreenUnits, _ScreenUnits, _ScreenUnits] | Tuple[()] = ...,
|
||||
scrollregion: tuple[_ScreenUnits, _ScreenUnits, _ScreenUnits, _ScreenUnits] | tuple[()] = ...,
|
||||
selectbackground: _Color = ...,
|
||||
selectborderwidth: _ScreenUnits = ...,
|
||||
selectforeground: _Color = ...,
|
||||
@@ -1091,9 +1091,9 @@ class Canvas(Widget, XView, YView):
|
||||
xscrollincrement: _ScreenUnits = ...,
|
||||
yscrollcommand: _XYScrollCommand = ...,
|
||||
yscrollincrement: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def addtag(self, *args): ... # internal method
|
||||
def addtag_above(self, newtag: str, tagOrId: str | _CanvasItemId) -> None: ...
|
||||
@@ -1125,7 +1125,7 @@ class Canvas(Widget, XView, YView):
|
||||
# Canvas.bbox() args are `str | _CanvasItemId`, but mypy rejects that
|
||||
# description because it's incompatible with Misc.bbox(), an alias for
|
||||
# Misc.grid_bbox(). Yes it is, but there's not much we can do about it.
|
||||
def bbox(self, *args: str | _CanvasItemId) -> Tuple[int, int, int, int]: ... # type: ignore
|
||||
def bbox(self, *args: str | _CanvasItemId) -> tuple[int, int, int, int]: ... # type: ignore
|
||||
@overload
|
||||
def tag_bind(
|
||||
self,
|
||||
@@ -1165,7 +1165,7 @@ class Canvas(Widget, XView, YView):
|
||||
activestipple: str = ...,
|
||||
activewidth: _ScreenUnits = ...,
|
||||
arrow: Literal["first", "last", "both"] = ...,
|
||||
arrowshape: Tuple[float, float, float] = ...,
|
||||
arrowshape: tuple[float, float, float] = ...,
|
||||
capstyle: Literal["round", "projecting", "butt"] = ...,
|
||||
dash: str | _TkinterSequence[int] = ...,
|
||||
dashoffset: _ScreenUnits = ...,
|
||||
@@ -1193,7 +1193,7 @@ class Canvas(Widget, XView, YView):
|
||||
activestipple: str = ...,
|
||||
activewidth: _ScreenUnits = ...,
|
||||
arrow: Literal["first", "last", "both"] = ...,
|
||||
arrowshape: Tuple[float, float, float] = ...,
|
||||
arrowshape: tuple[float, float, float] = ...,
|
||||
capstyle: Literal["round", "projecting", "butt"] = ...,
|
||||
dash: str | _TkinterSequence[int] = ...,
|
||||
dashoffset: _ScreenUnits = ...,
|
||||
@@ -1614,9 +1614,9 @@ class Checkbutton(Widget):
|
||||
variable: Variable | Literal[""] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
wraplength: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def deselect(self): ...
|
||||
def flash(self): ...
|
||||
@@ -1713,9 +1713,9 @@ class Entry(Widget, XView):
|
||||
vcmd: _EntryValidateCommand = ...,
|
||||
width: int = ...,
|
||||
xscrollcommand: _XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def delete(self, first: _EntryIndex, last: _EntryIndex | None = ...) -> None: ...
|
||||
def get(self) -> str: ...
|
||||
@@ -1761,7 +1761,7 @@ class Frame(Widget):
|
||||
pady: _ScreenUnits = ...,
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
visual: str | Tuple[str, int] = ...,
|
||||
visual: str | tuple[str, int] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
@@ -1784,9 +1784,9 @@ class Frame(Widget):
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Label(Widget):
|
||||
@@ -1864,9 +1864,9 @@ class Label(Widget):
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
wraplength: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Listbox(Widget, XView, YView):
|
||||
@@ -1954,9 +1954,9 @@ class Listbox(Widget, XView, YView):
|
||||
width: int = ...,
|
||||
xscrollcommand: _XYScrollCommand = ...,
|
||||
yscrollcommand: _XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def activate(self, index): ...
|
||||
def bbox(self, index): ...
|
||||
@@ -2042,9 +2042,9 @@ class Menu(Widget):
|
||||
tearoffcommand: Callable[[str, str], Any] | str = ...,
|
||||
title: str = ...,
|
||||
type: Literal["menubar", "tearoff", "normal"] = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def tk_popup(self, x: int, y: int, entry: _MenuIndex = ...) -> None: ...
|
||||
def activate(self, index: _MenuIndex) -> None: ...
|
||||
@@ -2244,7 +2244,7 @@ class Menu(Widget):
|
||||
def entrycget(self, index: _MenuIndex, option: str) -> Any: ...
|
||||
def entryconfigure(
|
||||
self, index: _MenuIndex, cnf: dict[str, Any] | None = ..., **kw: Any
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
entryconfig = entryconfigure
|
||||
def index(self, index: _MenuIndex) -> int | None: ...
|
||||
def invoke(self, index: _MenuIndex) -> Any: ...
|
||||
@@ -2335,9 +2335,9 @@ class Menubutton(Widget):
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
wraplength: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Message(Widget):
|
||||
@@ -2398,9 +2398,9 @@ class Message(Widget):
|
||||
text: float | str = ...,
|
||||
textvariable: Variable = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Radiobutton(Widget):
|
||||
@@ -2498,9 +2498,9 @@ class Radiobutton(Widget):
|
||||
variable: Variable | Literal[""] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
wraplength: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def deselect(self): ...
|
||||
def flash(self): ...
|
||||
@@ -2589,9 +2589,9 @@ class Scale(Widget):
|
||||
troughcolor: _Color = ...,
|
||||
variable: IntVar | DoubleVar = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def get(self): ...
|
||||
def set(self, value): ...
|
||||
@@ -2615,7 +2615,7 @@ class Scrollbar(Widget):
|
||||
# 'SCROLLING COMMANDS' in scrollbar man page. There doesn't seem to
|
||||
# be any way to specify an overloaded callback function, so we say
|
||||
# that it can take any args while it can't in reality.
|
||||
command: Callable[..., Tuple[float, float] | None] | str = ...,
|
||||
command: Callable[..., tuple[float, float] | None] | str = ...,
|
||||
cursor: _Cursor = ...,
|
||||
elementborderwidth: _ScreenUnits = ...,
|
||||
highlightbackground: _Color = ...,
|
||||
@@ -2643,7 +2643,7 @@ class Scrollbar(Widget):
|
||||
bg: _Color = ...,
|
||||
border: _ScreenUnits = ...,
|
||||
borderwidth: _ScreenUnits = ...,
|
||||
command: Callable[..., Tuple[float, float] | None] | str = ...,
|
||||
command: Callable[..., tuple[float, float] | None] | str = ...,
|
||||
cursor: _Cursor = ...,
|
||||
elementborderwidth: _ScreenUnits = ...,
|
||||
highlightbackground: _Color = ...,
|
||||
@@ -2657,9 +2657,9 @@ class Scrollbar(Widget):
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
troughcolor: _Color = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def activate(self, index: Any | None = ...): ...
|
||||
def delta(self, deltax, deltay): ...
|
||||
@@ -2777,11 +2777,11 @@ class Text(Widget, XView, YView):
|
||||
wrap: Literal["none", "char", "word"] = ...,
|
||||
xscrollcommand: _XYScrollCommand = ...,
|
||||
yscrollcommand: _XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def bbox(self, index: _TextIndex) -> Tuple[int, int, int, int] | None: ... # type: ignore
|
||||
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore
|
||||
def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
|
||||
def count(self, index1, index2, *args): ... # TODO
|
||||
@overload
|
||||
@@ -2789,7 +2789,7 @@ class Text(Widget, XView, YView):
|
||||
@overload
|
||||
def debug(self, boolean: bool) -> None: ...
|
||||
def delete(self, index1: _TextIndex, index2: _TextIndex | None = ...) -> None: ...
|
||||
def dlineinfo(self, index: _TextIndex) -> Tuple[int, int, int, int, int] | None: ...
|
||||
def dlineinfo(self, index: _TextIndex) -> tuple[int, int, int, int, int] | None: ...
|
||||
@overload
|
||||
def dump(
|
||||
self,
|
||||
@@ -2803,7 +2803,7 @@ class Text(Widget, XView, YView):
|
||||
tag: bool = ...,
|
||||
text: bool = ...,
|
||||
window: bool = ...,
|
||||
) -> list[Tuple[str, str, str]]: ...
|
||||
) -> list[tuple[str, str, str]]: ...
|
||||
@overload
|
||||
def dump(
|
||||
self,
|
||||
@@ -2923,15 +2923,15 @@ class Text(Widget, XView, YView):
|
||||
underline: bool = ...,
|
||||
underlinefg: _Color = ...,
|
||||
wrap: Literal["none", "char", "word"] = ..., # be careful with "none" vs None
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def tag_configure(self, tagName: str, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def tag_configure(self, tagName: str, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
tag_config = tag_configure
|
||||
def tag_delete(self, __first_tag_name: str, *tagNames: str) -> None: ... # error if no tag names given
|
||||
def tag_lower(self, tagName: str, belowThis: str | None = ...) -> None: ...
|
||||
def tag_names(self, index: _TextIndex | None = ...) -> Tuple[str, ...]: ...
|
||||
def tag_nextrange(self, tagName: str, index1: _TextIndex, index2: _TextIndex | None = ...) -> Tuple[str, str] | Tuple[()]: ...
|
||||
def tag_prevrange(self, tagName: str, index1: _TextIndex, index2: _TextIndex | None = ...) -> Tuple[str, str] | Tuple[()]: ...
|
||||
def tag_nextrange(self, tagName: str, index1: _TextIndex, index2: _TextIndex | None = ...) -> tuple[str, str] | tuple[()]: ...
|
||||
def tag_prevrange(self, tagName: str, index1: _TextIndex, index2: _TextIndex | None = ...) -> tuple[str, str] | tuple[()]: ...
|
||||
def tag_raise(self, tagName: str, aboveThis: str | None = ...) -> None: ...
|
||||
def tag_ranges(self, tagName: str) -> Tuple[_tkinter.Tcl_Obj, ...]: ...
|
||||
# tag_remove and tag_delete are different
|
||||
@@ -3016,9 +3016,9 @@ class PhotoImage(Image):
|
||||
def copy(self) -> PhotoImage: ...
|
||||
def zoom(self, x: int, y: int | Literal[""] = ...) -> PhotoImage: ...
|
||||
def subsample(self, x: int, y: int | Literal[""] = ...) -> PhotoImage: ...
|
||||
def get(self, x: int, y: int) -> Tuple[int, int, int]: ...
|
||||
def put(self, data: str | _TkinterSequence[str] | _TkinterSequence2D[_Color], to: Tuple[int, int] | None = ...) -> None: ...
|
||||
def write(self, filename: StrOrBytesPath, format: str | None = ..., from_coords: Tuple[int, int] | None = ...) -> None: ...
|
||||
def get(self, x: int, y: int) -> tuple[int, int, int]: ...
|
||||
def put(self, data: str | _TkinterSequence[str] | _TkinterSequence2D[_Color], to: tuple[int, int] | None = ...) -> None: ...
|
||||
def write(self, filename: StrOrBytesPath, format: str | None = ..., from_coords: tuple[int, int] | None = ...) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def transparency_get(self, x: int, y: int) -> bool: ...
|
||||
def transparency_set(self, x: int, y: int, boolean: bool) -> None: ...
|
||||
@@ -3155,9 +3155,9 @@ class Spinbox(Widget, XView):
|
||||
width: int = ...,
|
||||
wrap: bool = ...,
|
||||
xscrollcommand: _XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def bbox(self, index): ...
|
||||
def delete(self, first, last: Any | None = ...): ...
|
||||
@@ -3212,7 +3212,7 @@ class LabelFrame(Widget):
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: float | str = ...,
|
||||
visual: str | Tuple[str, int] = ...,
|
||||
visual: str | tuple[str, int] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
@@ -3241,9 +3241,9 @@ class LabelFrame(Widget):
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: float | str = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class PanedWindow(Widget):
|
||||
@@ -3301,9 +3301,9 @@ class PanedWindow(Widget):
|
||||
sashwidth: _ScreenUnits = ...,
|
||||
showhandle: bool = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def add(self, child: Widget, **kw): ...
|
||||
def remove(self, child): ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from tkinter.commondialog import Dialog
|
||||
from typing import Any, ClassVar, Tuple
|
||||
from typing import Any, ClassVar
|
||||
|
||||
class Chooser(Dialog):
|
||||
command: ClassVar[str]
|
||||
|
||||
def askcolor(color: str | bytes | None = ..., **options: Any) -> Tuple[None, None] | Tuple[Tuple[float, float, float], str]: ...
|
||||
def askcolor(color: str | bytes | None = ..., **options: Any) -> tuple[None, None] | tuple[tuple[float, float, float], str]: ...
|
||||
|
||||
@@ -3,7 +3,7 @@ from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, T
|
||||
from typing import IO, Any, ClassVar, Iterable, Tuple
|
||||
from typing_extensions import Literal
|
||||
|
||||
dialogstates: dict[Any, Tuple[Any, Any]]
|
||||
dialogstates: dict[Any, tuple[Any, Any]]
|
||||
|
||||
class FileDialog:
|
||||
title: str
|
||||
@@ -64,7 +64,7 @@ def asksaveasfilename(
|
||||
*,
|
||||
confirmoverwrite: bool | None = ...,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -74,7 +74,7 @@ def asksaveasfilename(
|
||||
def askopenfilename(
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -84,7 +84,7 @@ def askopenfilename(
|
||||
def askopenfilenames(
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -101,7 +101,7 @@ def asksaveasfile(
|
||||
*,
|
||||
confirmoverwrite: bool | None = ...,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -112,7 +112,7 @@ def askopenfile(
|
||||
mode: str = ...,
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -123,7 +123,7 @@ def askopenfiles(
|
||||
mode: str = ...,
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[Tuple[str, str] | Tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str] | tuple[str, _TkinterSequence[str]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
|
||||
@@ -193,7 +193,7 @@ class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def indicator_delete(self, entry: str) -> None: ...
|
||||
def indicator_size(self, entry: str) -> int: ...
|
||||
def info_anchor(self) -> str: ...
|
||||
def info_bbox(self, entry: str) -> Tuple[int, int, int, int]: ...
|
||||
def info_bbox(self, entry: str) -> tuple[int, int, int, int]: ...
|
||||
def info_children(self, entry: str | None = ...) -> Tuple[str, ...]: ...
|
||||
def info_data(self, entry: str) -> Any: ...
|
||||
def info_dragsite(self) -> str: ...
|
||||
@@ -296,6 +296,6 @@ class Form:
|
||||
def form(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def check(self) -> bool: ...
|
||||
def forget(self) -> None: ...
|
||||
def grid(self, xsize: int = ..., ysize: int = ...) -> Tuple[int, int] | None: ...
|
||||
def grid(self, xsize: int = ..., ysize: int = ...) -> tuple[int, int] | None: ...
|
||||
def info(self, option: str | None = ...) -> Any: ...
|
||||
def slaves(self) -> list[tkinter.Widget]: ...
|
||||
|
||||
@@ -75,9 +75,9 @@ class Button(Widget):
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: int | Literal[""] = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def invoke(self) -> Any: ...
|
||||
|
||||
@@ -127,9 +127,9 @@ class Checkbutton(Widget):
|
||||
underline: int = ...,
|
||||
variable: tkinter.Variable = ...,
|
||||
width: int | Literal[""] = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def invoke(self) -> Any: ...
|
||||
|
||||
@@ -179,9 +179,9 @@ class Entry(Widget, tkinter.Entry):
|
||||
validatecommand: tkinter._EntryValidateCommand = ...,
|
||||
width: int = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Entry().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@@ -204,9 +204,9 @@ class Entry(Widget, tkinter.Entry):
|
||||
validatecommand: tkinter._EntryValidateCommand = ...,
|
||||
width: int = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
def bbox(self, index): ...
|
||||
def identify(self, x, y): ...
|
||||
def validate(self): ...
|
||||
@@ -262,9 +262,9 @@ class Combobox(Entry):
|
||||
values: tkinter._TkinterSequence[str] = ...,
|
||||
width: int = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Combobox().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@@ -290,9 +290,9 @@ class Combobox(Entry):
|
||||
values: tkinter._TkinterSequence[str] = ...,
|
||||
width: int = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
def current(self, newindex: Any | None = ...): ...
|
||||
def set(self, value): ...
|
||||
|
||||
@@ -327,9 +327,9 @@ class Frame(Widget):
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Label(Widget):
|
||||
@@ -385,9 +385,9 @@ class Label(Widget):
|
||||
underline: int = ...,
|
||||
width: int | Literal[""] = ...,
|
||||
wraplength: tkinter._ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Labelframe(Widget):
|
||||
@@ -429,9 +429,9 @@ class Labelframe(Widget):
|
||||
text: float | str = ...,
|
||||
underline: int = ...,
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
LabelFrame = Labelframe
|
||||
@@ -475,9 +475,9 @@ class Menubutton(Widget):
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: int | Literal[""] = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Notebook(Widget):
|
||||
@@ -505,9 +505,9 @@ class Notebook(Widget):
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
width: int = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def add(
|
||||
self,
|
||||
@@ -557,9 +557,9 @@ class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
width: int = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Panedwindow().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@@ -571,9 +571,9 @@ class Panedwindow(Widget, tkinter.PanedWindow):
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
width: int = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
forget: Any
|
||||
def insert(self, pos, child, **kw): ...
|
||||
def pane(self, pane, option: Any | None = ..., **kw): ...
|
||||
@@ -614,9 +614,9 @@ class Progressbar(Widget):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
value: float = ...,
|
||||
variable: tkinter.IntVar | tkinter.DoubleVar = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def start(self, interval: Any | None = ...): ...
|
||||
def step(self, amount: Any | None = ...): ...
|
||||
@@ -663,9 +663,9 @@ class Radiobutton(Widget):
|
||||
value: Any = ...,
|
||||
variable: tkinter.Variable | Literal[""] = ...,
|
||||
width: int | Literal[""] = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def invoke(self) -> Any: ...
|
||||
|
||||
@@ -704,9 +704,9 @@ class Scale(Widget, tkinter.Scale):
|
||||
to: float = ...,
|
||||
value: float = ...,
|
||||
variable: tkinter.IntVar | tkinter.DoubleVar = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Scale().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
@@ -724,9 +724,9 @@ class Scale(Widget, tkinter.Scale):
|
||||
to: float = ...,
|
||||
value: float = ...,
|
||||
variable: tkinter.IntVar | tkinter.DoubleVar = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
def get(self, x: Any | None = ..., y: Any | None = ...): ...
|
||||
|
||||
class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
@@ -735,7 +735,7 @@ class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
master: tkinter.Misc | None = ...,
|
||||
*,
|
||||
class_: str = ...,
|
||||
command: Callable[..., Tuple[float, float] | None] | str = ...,
|
||||
command: Callable[..., tuple[float, float] | None] | str = ...,
|
||||
cursor: tkinter._Cursor = ...,
|
||||
name: str = ...,
|
||||
orient: Literal["horizontal", "vertical"] = ...,
|
||||
@@ -747,28 +747,28 @@ class Scrollbar(Widget, tkinter.Scrollbar):
|
||||
self,
|
||||
cnf: dict[str, Any] | None = ...,
|
||||
*,
|
||||
command: Callable[..., Tuple[float, float] | None] | str = ...,
|
||||
command: Callable[..., tuple[float, float] | None] | str = ...,
|
||||
cursor: tkinter._Cursor = ...,
|
||||
orient: Literal["horizontal", "vertical"] = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
# config must be copy/pasted, otherwise ttk.Scrollbar().config is mypy error (don't know why)
|
||||
@overload # type: ignore
|
||||
def config(
|
||||
self,
|
||||
cnf: dict[str, Any] | None = ...,
|
||||
*,
|
||||
command: Callable[..., Tuple[float, float] | None] | str = ...,
|
||||
command: Callable[..., tuple[float, float] | None] | str = ...,
|
||||
cursor: tkinter._Cursor = ...,
|
||||
orient: Literal["horizontal", "vertical"] = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def config(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
|
||||
class Separator(Widget):
|
||||
def __init__(
|
||||
@@ -791,9 +791,9 @@ class Separator(Widget):
|
||||
orient: Literal["horizontal", "vertical"] = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
class Sizegrip(Widget):
|
||||
@@ -815,9 +815,9 @@ class Sizegrip(Widget):
|
||||
cursor: tkinter._Cursor = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
@@ -880,9 +880,9 @@ if sys.version_info >= (3, 7):
|
||||
width: int = ...,
|
||||
wrap: bool = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure # type: ignore
|
||||
def set(self, value: Any) -> None: ...
|
||||
|
||||
@@ -955,11 +955,11 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
xscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
yscrollcommand: tkinter._XYScrollCommand = ...,
|
||||
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
|
||||
) -> dict[str, tuple[str, str, str, Any, Any]] | None: ...
|
||||
@overload
|
||||
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
|
||||
def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ...
|
||||
config = configure
|
||||
def bbox(self, item, column: _TreeviewColumnId | None = ...) -> Tuple[int, int, int, int] | Literal[""]: ... # type: ignore
|
||||
def bbox(self, item, column: _TreeviewColumnId | None = ...) -> tuple[int, int, int, int] | Literal[""]: ... # type: ignore
|
||||
def get_children(self, item: str | None = ...) -> Tuple[str, ...]: ...
|
||||
def set_children(self, item: str, *newchildren: str) -> None: ...
|
||||
@overload
|
||||
@@ -994,7 +994,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
@overload
|
||||
def heading(self, column: _TreeviewColumnId, option: Literal["text"]) -> str: ...
|
||||
@overload
|
||||
def heading(self, column: _TreeviewColumnId, option: Literal["image"]) -> Tuple[str]: ...
|
||||
def heading(self, column: _TreeviewColumnId, option: Literal["image"]) -> tuple[str]: ...
|
||||
@overload
|
||||
def heading(self, column: _TreeviewColumnId, option: Literal["anchor"]) -> _tkinter.Tcl_Obj: ...
|
||||
@overload
|
||||
@@ -1034,7 +1034,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
@overload
|
||||
def item(self, item: str, option: Literal["text"]) -> str: ...
|
||||
@overload
|
||||
def item(self, item: str, option: Literal["image"]) -> Literal[""] | Tuple[str]: ...
|
||||
def item(self, item: str, option: Literal["image"]) -> Literal[""] | tuple[str]: ...
|
||||
@overload
|
||||
def item(self, item: str, option: Literal["values"]) -> Literal[""] | Tuple[Any, ...]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user