diff --git a/PIL/Image.py b/PIL/Image.py index c54349d15..96ab09efc 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -539,7 +539,7 @@ class Image(object): self.palette = None # type: Optional[ImagePalette.ImagePalette] self.info = {} # type: Dict[Text, Any] self.category = NORMAL - self.readonly = 0 + self.readonly = 0 # type: int self.pyaccess = None @property diff --git a/PIL/_imaging.pyi b/PIL/_imaging.pyi index a8f20fe14..f5d691c7c 100644 --- a/PIL/_imaging.pyi +++ b/PIL/_imaging.pyi @@ -37,7 +37,7 @@ class ImagingCore: def getpixel(self, xy: XY) -> Optional[Any]: ... def putpixel(self, xy: XY, value: Any) -> None: ... - def pixel_access(self, readonly: bool) -> Any: ... + def pixel_access(self, readonly: int) -> Any: ... def convert(self, mode, dither, paletteimage): ... def convert2(self): ... ###