Add missing tagOrId parameter to tkinter.Canvas.coords() (#6920) (#7246)

This commit is contained in:
Spencer Brown
2022-02-17 19:45:31 +10:00
committed by GitHub
parent e3742686b1
commit 5c309e5fe4

View File

@@ -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: ...