Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e98f398

Browse files
authored
allow bytes in tkinter.PhotoImage (#5171)
1 parent dec1396 commit e98f398

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stdlib/tkinter/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,7 @@ class PhotoImage(Image):
26472647
cnf: Dict[str, Any] = ...,
26482648
master: Optional[Union[Misc, _tkinter.TkappType]] = ...,
26492649
*,
2650-
data: str = ..., # not same as data argument of put()
2650+
data: Union[str, bytes] = ..., # not same as data argument of put()
26512651
format: str = ...,
26522652
file: AnyPath = ...,
26532653
gamma: float = ...,
@@ -2658,7 +2658,7 @@ class PhotoImage(Image):
26582658
def configure(
26592659
self,
26602660
*,
2661-
data: str = ...,
2661+
data: Union[str, bytes] = ...,
26622662
format: str = ...,
26632663
file: AnyPath = ...,
26642664
gamma: float = ...,
@@ -2690,7 +2690,7 @@ class BitmapImage(Image):
26902690
master: Optional[Union[Misc, _tkinter.TkappType]] = ...,
26912691
*,
26922692
background: _Color = ...,
2693-
data: str = ...,
2693+
data: Union[str, bytes] = ...,
26942694
file: AnyPath = ...,
26952695
foreground: _Color = ...,
26962696
maskdata: str = ...,

0 commit comments

Comments
 (0)