mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Changed: text argument type to support float and int values for Tkinter
* Changed: text argument type to support float and int values for Tkinter
This commit is contained in:
@@ -949,7 +949,7 @@ class Button(Widget):
|
||||
repeatinterval: int = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
# We allow the textvariable to be any Variable, not necessarly
|
||||
# StringVar. This is useful for e.g. a button that displays the value
|
||||
# of an IntVar.
|
||||
@@ -994,7 +994,7 @@ class Button(Widget):
|
||||
repeatinterval: int = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -1259,7 +1259,7 @@ class Canvas(Widget, XView, YView):
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
stipple: _Bitmap = ...,
|
||||
tags: Union[str, Tuple[str, ...]] = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> _CanvasItemId: ...
|
||||
def create_window(
|
||||
@@ -1362,7 +1362,7 @@ class Checkbutton(Widget):
|
||||
selectimage: _ImageSpec = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
tristateimage: _ImageSpec = ...,
|
||||
tristatevalue: Any = ...,
|
||||
@@ -1410,7 +1410,7 @@ class Checkbutton(Widget):
|
||||
selectimage: _ImageSpec = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
tristateimage: _ImageSpec = ...,
|
||||
tristatevalue: Any = ...,
|
||||
@@ -1624,7 +1624,7 @@ class Label(Widget):
|
||||
relief: _Relief = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -1661,7 +1661,7 @@ class Label(Widget):
|
||||
relief: _Relief = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -2090,7 +2090,7 @@ class Menubutton(Widget):
|
||||
relief: _Relief = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -2130,7 +2130,7 @@ class Menubutton(Widget):
|
||||
relief: _Relief = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
underline: int = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -2166,7 +2166,7 @@ class Message(Widget):
|
||||
pady: _ScreenUnits = ...,
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
# there's width but no height
|
||||
width: _ScreenUnits = ...,
|
||||
@@ -2195,7 +2195,7 @@ class Message(Widget):
|
||||
pady: _ScreenUnits = ...,
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@@ -2242,7 +2242,7 @@ class Radiobutton(Widget):
|
||||
selectimage: _ImageSpec = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
tristateimage: _ImageSpec = ...,
|
||||
tristatevalue: Any = ...,
|
||||
@@ -2289,7 +2289,7 @@ class Radiobutton(Widget):
|
||||
selectimage: _ImageSpec = ...,
|
||||
state: Literal["normal", "active", "disabled"] = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: Variable = ...,
|
||||
tristateimage: _ImageSpec = ...,
|
||||
tristatevalue: Any = ...,
|
||||
@@ -3022,7 +3022,7 @@ class LabelFrame(Widget):
|
||||
pady: _ScreenUnits = ...,
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
visual: Union[str, Tuple[str, int]] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> None: ...
|
||||
@@ -3050,7 +3050,7 @@ class LabelFrame(Widget):
|
||||
pady: _ScreenUnits = ...,
|
||||
relief: _Relief = ...,
|
||||
takefocus: _TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
width: _ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@overload
|
||||
|
||||
@@ -49,7 +49,7 @@ class Button(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -68,7 +68,7 @@ class Button(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -95,7 +95,7 @@ class Checkbutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
# Seems like variable can be empty string, but actually setting it to
|
||||
@@ -119,7 +119,7 @@ class Checkbutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
variable: tkinter.Variable = ...,
|
||||
@@ -351,7 +351,7 @@ class Label(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -377,7 +377,7 @@ class Label(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -404,7 +404,7 @@ class Labelframe(Widget):
|
||||
relief: tkinter._Relief = ..., # undocumented
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
underline: int = ...,
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> None: ...
|
||||
@@ -423,7 +423,7 @@ class Labelframe(Widget):
|
||||
relief: tkinter._Relief = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
underline: int = ...,
|
||||
width: tkinter._ScreenUnits = ...,
|
||||
) -> Optional[Dict[str, Tuple[str, str, str, Any, Any]]]: ...
|
||||
@@ -449,7 +449,7 @@ class Menubutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -468,7 +468,7 @@ class Menubutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
width: Union[int, Literal[""]] = ...,
|
||||
@@ -622,7 +622,7 @@ class Radiobutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
value: Any = ...,
|
||||
@@ -642,7 +642,7 @@ class Radiobutton(Widget):
|
||||
state: str = ...,
|
||||
style: str = ...,
|
||||
takefocus: tkinter._TakeFocusValue = ...,
|
||||
text: str = ...,
|
||||
text: Union[float, str] = ...,
|
||||
textvariable: tkinter.Variable = ...,
|
||||
underline: int = ...,
|
||||
value: Any = ...,
|
||||
|
||||
Reference in New Issue
Block a user