From c45a879b1fc0345130f61479c715673bdc048c95 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sun, 3 Jan 2021 17:47:31 +0200 Subject: [PATCH] add types to winfo methods that return coordinates or sizes (#4894) --- stdlib/3/tkinter/__init__.pyi | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/stdlib/3/tkinter/__init__.pyi b/stdlib/3/tkinter/__init__.pyi index c1f0b18c7..ffb3d6188 100644 --- a/stdlib/3/tkinter/__init__.pyi +++ b/stdlib/3/tkinter/__init__.pyi @@ -284,9 +284,9 @@ class Misc: def winfo_containing(self, rootX, rootY, displayof: int = ...): ... def winfo_depth(self): ... def winfo_exists(self): ... - def winfo_fpixels(self, number): ... + def winfo_fpixels(self, number: _ScreenUnits) -> float: ... def winfo_geometry(self): ... - def winfo_height(self): ... + def winfo_height(self) -> int: ... def winfo_id(self): ... def winfo_interps(self, displayof: int = ...): ... def winfo_ismapped(self): ... @@ -294,36 +294,36 @@ class Misc: def winfo_name(self): ... def winfo_parent(self): ... def winfo_pathname(self, id, displayof: int = ...): ... - def winfo_pixels(self, number): ... - def winfo_pointerx(self): ... - def winfo_pointerxy(self): ... - def winfo_pointery(self): ... - def winfo_reqheight(self): ... - def winfo_reqwidth(self): ... + def winfo_pixels(self, number: _ScreenUnits) -> int: ... + def winfo_pointerx(self) -> int: ... + def winfo_pointerxy(self) -> Tuple[int, int]: ... + def winfo_pointery(self) -> int: ... + def winfo_reqheight(self) -> int: ... + def winfo_reqwidth(self) -> int: ... def winfo_rgb(self, color): ... - def winfo_rootx(self): ... - def winfo_rooty(self): ... + def winfo_rootx(self) -> int: ... + def winfo_rooty(self) -> int: ... def winfo_screen(self): ... def winfo_screencells(self): ... def winfo_screendepth(self): ... - def winfo_screenheight(self): ... - def winfo_screenmmheight(self): ... - def winfo_screenmmwidth(self): ... + def winfo_screenheight(self) -> int: ... + def winfo_screenmmheight(self) -> int: ... + def winfo_screenmmwidth(self) -> int: ... def winfo_screenvisual(self): ... - def winfo_screenwidth(self): ... + def winfo_screenwidth(self) -> int: ... def winfo_server(self): ... def winfo_toplevel(self): ... def winfo_viewable(self): ... def winfo_visual(self): ... def winfo_visualid(self): ... def winfo_visualsavailable(self, includeids: int = ...): ... - def winfo_vrootheight(self): ... - def winfo_vrootwidth(self): ... - def winfo_vrootx(self): ... - def winfo_vrooty(self): ... - def winfo_width(self): ... - def winfo_x(self): ... - def winfo_y(self): ... + def winfo_vrootheight(self) -> int: ... + def winfo_vrootwidth(self) -> int: ... + def winfo_vrootx(self) -> int: ... + def winfo_vrooty(self) -> int: ... + def winfo_width(self) -> int: ... + def winfo_x(self) -> int: ... + def winfo_y(self) -> int: ... def update(self): ... def update_idletasks(self): ... def bindtags(self, tagList: Optional[Any] = ...): ...