From 8f7ce5be268bfe024554d6a823fa6ba57960f3c5 Mon Sep 17 00:00:00 2001 From: Akuli Date: Wed, 20 Jan 2021 03:02:22 +0200 Subject: [PATCH] use str for ttk states (#4955) --- stdlib/3/tkinter/ttk.pyi | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/stdlib/3/tkinter/ttk.pyi b/stdlib/3/tkinter/ttk.pyi index 5257cf114..1baac3372 100644 --- a/stdlib/3/tkinter/ttk.pyi +++ b/stdlib/3/tkinter/ttk.pyi @@ -46,7 +46,7 @@ class Button(Widget): image: tkinter._ImageSpec = ..., name: str = ..., padding: Any = ..., # undocumented - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -65,7 +65,7 @@ class Button(Widget): default: Literal["normal", "active", "disabled"] = ..., image: tkinter._ImageSpec = ..., padding: Any = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -92,7 +92,7 @@ class Checkbutton(Widget): offvalue: Any = ..., onvalue: Any = ..., padding: Any = ..., # undocumented - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -116,7 +116,7 @@ class Checkbutton(Widget): offvalue: Any = ..., onvalue: Any = ..., padding: Any = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -146,7 +146,7 @@ class Entry(Widget, tkinter.Entry): justify: Literal["left", "center", "right"] = ..., name: str = ..., show: str = ..., - state: Literal["normal", "disabled", "readonly"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -168,7 +168,7 @@ class Entry(Widget, tkinter.Entry): invalidcommand: tkinter._EntryValidateCommand = ..., justify: Literal["left", "center", "right"] = ..., show: str = ..., - state: Literal["normal", "disabled", "readonly"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -193,7 +193,7 @@ class Entry(Widget, tkinter.Entry): invalidcommand: tkinter._EntryValidateCommand = ..., justify: Literal["left", "center", "right"] = ..., show: str = ..., - state: Literal["normal", "disabled", "readonly"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -225,7 +225,7 @@ class Combobox(Entry): name: str = ..., postcommand: Union[Callable[[], Any], str] = ..., show: Any = ..., # undocumented - state: Literal["normal", "readonly", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -250,7 +250,7 @@ class Combobox(Entry): justify: Literal["left", "center", "right"] = ..., postcommand: Union[Callable[[], Any], str] = ..., show: Any = ..., - state: Literal["normal", "readonly", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -278,7 +278,7 @@ class Combobox(Entry): justify: Literal["left", "center", "right"] = ..., postcommand: Union[Callable[[], Any], str] = ..., show: Any = ..., - state: Literal["normal", "readonly", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., @@ -348,7 +348,7 @@ class Label(Widget): name: str = ..., padding: tkinter._Padding = ..., relief: tkinter._Relief = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -374,7 +374,7 @@ class Label(Widget): justify: Literal["left", "center", "right"] = ..., padding: tkinter._Padding = ..., relief: tkinter._Relief = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -446,7 +446,7 @@ class Menubutton(Widget): menu: tkinter.Menu = ..., name: str = ..., padding: Any = ..., # undocumented - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -465,7 +465,7 @@ class Menubutton(Widget): image: tkinter._ImageSpec = ..., menu: tkinter.Menu = ..., padding: Any = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -619,7 +619,7 @@ class Radiobutton(Widget): image: tkinter._ImageSpec = ..., name: str = ..., padding: Any = ..., # undocumented - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -639,7 +639,7 @@ class Radiobutton(Widget): cursor: tkinter._Cursor = ..., image: tkinter._ImageSpec = ..., padding: Any = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., text: str = ..., @@ -666,7 +666,7 @@ class Scale(Widget, tkinter.Scale): length: tkinter._ScreenUnits = ..., name: str = ..., orient: Literal["horizontal", "vertical"] = ..., - state: Any = ..., # undocumented + state: str = ..., # undocumented style: str = ..., takefocus: tkinter._TakeFocusValue = ..., to: float = ..., @@ -683,7 +683,7 @@ class Scale(Widget, tkinter.Scale): from_: float = ..., length: tkinter._ScreenUnits = ..., orient: Literal["horizontal", "vertical"] = ..., - state: Any = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., to: float = ..., @@ -703,7 +703,7 @@ class Scale(Widget, tkinter.Scale): from_: float = ..., length: tkinter._ScreenUnits = ..., orient: Literal["horizontal", "vertical"] = ..., - state: Any = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., to: float = ..., @@ -825,7 +825,7 @@ if sys.version_info >= (3, 7): justify: Literal["left", "center", "right"] = ..., # undocumented name: str = ..., show: Any = ..., # undocumented - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ..., # undocumented @@ -854,7 +854,7 @@ if sys.version_info >= (3, 7): invalidcommand: tkinter._EntryValidateCommand = ..., justify: Literal["left", "center", "right"] = ..., show: Any = ..., - state: Literal["normal", "disabled"] = ..., + state: str = ..., style: str = ..., takefocus: tkinter._TakeFocusValue = ..., textvariable: tkinter.Variable = ...,