From 3c26c7221c5680668fb1f8eed7876db6a75ed2a3 Mon Sep 17 00:00:00 2001 From: melassa Date: Sat, 2 Jan 2021 19:56:41 +0100 Subject: [PATCH] _PlaceInfo and place_configure fix #4872 (#4873) Co-authored-by: Akuli --- stdlib/3/tkinter/__init__.pyi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stdlib/3/tkinter/__init__.pyi b/stdlib/3/tkinter/__init__.pyi index 654769655..a8ac84833 100644 --- a/stdlib/3/tkinter/__init__.pyi +++ b/stdlib/3/tkinter/__init__.pyi @@ -675,8 +675,8 @@ class _PlaceInfo(_InMiscNonTotal): # empty dict if widget hasn't been placed y: str # can be int()ed relheight: str # can be float()ed if not empty string relwidth: str # can be float()ed if not empty string - relx: float # can be float()ed if not empty string - rely: float # can be float()ed if not empty string + relx: str # can be float()ed if not empty string + rely: str # can be float()ed if not empty string class Place: def place_configure( @@ -689,10 +689,11 @@ class Place: height: _ScreenUnits = ..., x: _ScreenUnits = ..., y: _ScreenUnits = ..., - relheight: float = ..., - relwidth: float = ..., - relx: float = ..., - rely: float = ..., + # str allowed for compatibility with place_info() + relheight: Union[str, float] = ..., + relwidth: Union[str, float] = ..., + relx: Union[str, float] = ..., + rely: Union[str, float] = ..., in_: Misc = ..., **kw: Any, # allow keyword argument named 'in', see #4836 ) -> None: ...