use str for ttk states (#4955)

This commit is contained in:
Akuli
2021-01-20 03:02:22 +02:00
committed by GitHub
parent 053e0df0a5
commit 8f7ce5be26

View File

@@ -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 = ...,