diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 687768e3a..12d33c62d 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -1063,7 +1063,7 @@ class Canvas(Widget, XView, YView): @overload def tag_bind( self, - tagOrId: str | int, + tagOrId: str | _CanvasItemId, sequence: str | None = ..., func: Callable[[Event[Canvas]], Any] | None = ..., add: Literal["", "+"] | bool | None = ..., @@ -1073,16 +1073,16 @@ class Canvas(Widget, XView, YView): self, tagOrId: str | int, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = ... ) -> None: ... @overload - def tag_bind(self, tagOrId: str | int, *, func: str, add: Literal["", "+"] | bool | None = ...) -> None: ... - def tag_unbind(self, tagOrId: str | int, sequence: str, funcid: str | None = ...) -> None: ... + def tag_bind(self, tagOrId: str | _CanvasItemId, *, func: str, add: Literal["", "+"] | bool | None = ...) -> None: ... + def tag_unbind(self, tagOrId: str | _CanvasItemId, sequence: str, funcid: str | None = ...) -> None: ... def canvasx(self, screenx, gridspacing: Any | None = ...): ... def canvasy(self, screeny, gridspacing: Any | None = ...): ... @overload - def coords(self) -> list[float]: ... + def coords(self, __tagOrId: str | _CanvasItemId) -> list[float]: ... @overload - def coords(self, __args: list[int] | list[float] | tuple[float, ...]) -> None: ... + def coords(self, __tagOrId: str | _CanvasItemId, __args: list[int] | list[float] | tuple[float, ...]) -> None: ... @overload - def coords(self, __x1: float, __y1: float, *args: float) -> None: ... + def coords(self, __tagOrId: str | _CanvasItemId, __x1: float, __y1: float, *args: float) -> None: ... # create_foo() methods accept coords as a list, a tuple, or as separate arguments. # Keyword arguments should be the same in each pair of overloads. def create_arc(self, *args, **kw) -> _CanvasItemId: ...