diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index a33f30adcbb9..59cbc4401e51 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -2236,8 +2236,8 @@ class Entry(Widget, XView): insertofftime: int = 300, insertontime: int = 600, insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", # same as invalidcommand + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = "", + invcmd: str | list[str] | tuple[str, ...] | Callable[[], object] = "", # same as invalidcommand justify: Literal["left", "center", "right"] = "left", name: str = ..., readonlybackground: str = ..., @@ -2281,8 +2281,8 @@ class Entry(Widget, XView): insertofftime: int = ..., insertontime: int = ..., insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., + invcmd: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., readonlybackground: str = ..., relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., @@ -4123,8 +4123,8 @@ class Spinbox(Widget, XView): insertofftime: int = 300, insertontime: int = 600, insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = "", + invcmd: str | list[str] | tuple[str, ...] | Callable[[], object] = "", justify: Literal["left", "center", "right"] = "left", name: str = ..., readonlybackground: str = ..., @@ -4181,8 +4181,8 @@ class Spinbox(Widget, XView): insertofftime: int = ..., insertontime: int = ..., insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., + invcmd: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., readonlybackground: str = ..., relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., diff --git a/stdlib/tkinter/ttk.pyi b/stdlib/tkinter/ttk.pyi index 06d2be13dc28..bf184bc2e8f8 100644 --- a/stdlib/tkinter/ttk.pyi +++ b/stdlib/tkinter/ttk.pyi @@ -340,7 +340,7 @@ class Entry(Widget, tkinter.Entry): exportselection: bool = True, font: _FontDescription = "TkTextFont", foreground: str = "", - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = "", justify: Literal["left", "center", "right"] = "left", name: str = ..., show: str = "", @@ -364,7 +364,7 @@ class Entry(Widget, tkinter.Entry): exportselection: bool = ..., font: _FontDescription = ..., foreground: str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., show: str = ..., state: str = ..., @@ -390,7 +390,7 @@ class Entry(Widget, tkinter.Entry): exportselection: bool = ..., font: _FontDescription = ..., foreground: str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., show: str = ..., state: str = ..., @@ -421,7 +421,7 @@ class Combobox(Entry): font: _FontDescription = ..., # undocumented foreground: str = ..., # undocumented height: int = 10, - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., # undocumented + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., # undocumented justify: Literal["left", "center", "right"] = "left", name: str = ..., postcommand: Callable[[], object] | str = "", @@ -448,7 +448,7 @@ class Combobox(Entry): font: _FontDescription = ..., foreground: str = ..., height: int = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., postcommand: Callable[[], object] | str = ..., show=..., @@ -477,7 +477,7 @@ class Combobox(Entry): font: _FontDescription = ..., foreground: str = ..., height: int = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., postcommand: Callable[[], object] | str = ..., show=..., @@ -1068,7 +1068,7 @@ class Spinbox(Entry): format: str = "", from_: float = 0, increment: float = 1, - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., # undocumented + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., # undocumented justify: Literal["left", "center", "right"] = ..., # undocumented name: str = ..., show=..., # undocumented @@ -1099,7 +1099,7 @@ class Spinbox(Entry): format: str = ..., from_: float = ..., increment: float = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., + invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], object] = ..., justify: Literal["left", "center", "right"] = ..., show=..., state: str = ...,