Fix "state" type annotations for tkinter "Canvas.create_*" methods (#11257)

This commit is contained in:
Romain d'Esparbès
2024-01-08 17:53:18 +01:00
committed by GitHub
parent adc2e16798
commit db804846a4

View File

@@ -1254,7 +1254,7 @@ class Canvas(Widget, XView, YView):
offset: _ScreenUnits = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1283,7 +1283,7 @@ class Canvas(Widget, XView, YView):
offset: _ScreenUnits = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1318,7 +1318,7 @@ class Canvas(Widget, XView, YView):
offset: _ScreenUnits = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1350,7 +1350,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1380,7 +1380,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1416,7 +1416,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1451,7 +1451,7 @@ class Canvas(Widget, XView, YView):
outlinestipple: str = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1484,7 +1484,7 @@ class Canvas(Widget, XView, YView):
outlinestipple: str = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1523,7 +1523,7 @@ class Canvas(Widget, XView, YView):
outlinestipple: str = ...,
smooth: bool = ...,
splinesteps: float = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1555,7 +1555,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1585,7 +1585,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1621,7 +1621,7 @@ class Canvas(Widget, XView, YView):
outline: str = ...,
outlineoffset: _ScreenUnits = ...,
outlinestipple: str = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
@@ -1642,7 +1642,7 @@ class Canvas(Widget, XView, YView):
font: _FontDescription = ...,
justify: Literal["left", "center", "right"] = ...,
offset: _ScreenUnits = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
text: float | str = ...,
@@ -1663,7 +1663,7 @@ class Canvas(Widget, XView, YView):
font: _FontDescription = ...,
justify: Literal["left", "center", "right"] = ...,
offset: _ScreenUnits = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
stipple: str = ...,
tags: str | list[str] | tuple[str, ...] = ...,
text: float | str = ...,
@@ -1677,7 +1677,7 @@ class Canvas(Widget, XView, YView):
*,
anchor: _Anchor = ...,
height: _ScreenUnits = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
window: Widget = ...,
@@ -1689,7 +1689,7 @@ class Canvas(Widget, XView, YView):
*,
anchor: _Anchor = ...,
height: _ScreenUnits = ...,
state: Literal["normal", "active", "disabled"] = ...,
state: Literal["normal", "hidden", "disabled"] = ...,
tags: str | list[str] | tuple[str, ...] = ...,
width: _ScreenUnits = ...,
window: Widget = ...,