From e98f398abcc4c8816c3e90b220f875db0f9c917b Mon Sep 17 00:00:00 2001 From: Akuli Date: Thu, 1 Apr 2021 13:54:49 +0300 Subject: [PATCH] allow bytes in tkinter.PhotoImage (#5171) --- stdlib/tkinter/__init__.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 3e054db62..56e8d60b9 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -2647,7 +2647,7 @@ class PhotoImage(Image): cnf: Dict[str, Any] = ..., master: Optional[Union[Misc, _tkinter.TkappType]] = ..., *, - data: str = ..., # not same as data argument of put() + data: Union[str, bytes] = ..., # not same as data argument of put() format: str = ..., file: AnyPath = ..., gamma: float = ..., @@ -2658,7 +2658,7 @@ class PhotoImage(Image): def configure( self, *, - data: str = ..., + data: Union[str, bytes] = ..., format: str = ..., file: AnyPath = ..., gamma: float = ..., @@ -2690,7 +2690,7 @@ class BitmapImage(Image): master: Optional[Union[Misc, _tkinter.TkappType]] = ..., *, background: _Color = ..., - data: str = ..., + data: Union[str, bytes] = ..., file: AnyPath = ..., foreground: _Color = ..., maskdata: str = ...,