From d07ba24f3c5ceb07dce97a36976565fcc4821ef9 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 10 May 2024 11:29:09 +0300 Subject: [PATCH] Add typehints for `open` in `PIL.WallImageFile` (#11887) --- stubs/Pillow/PIL/WalImageFile.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/Pillow/PIL/WalImageFile.pyi b/stubs/Pillow/PIL/WalImageFile.pyi index e69c2b308..c48f91929 100644 --- a/stubs/Pillow/PIL/WalImageFile.pyi +++ b/stubs/Pillow/PIL/WalImageFile.pyi @@ -1,3 +1,4 @@ +from _typeshed import StrOrBytesPath from typing import ClassVar, Literal from . import ImageFile @@ -8,6 +9,6 @@ class WalImageFile(ImageFile.ImageFile): format_description: ClassVar[str] def load(self) -> _PixelAccessor: ... -def open(filename): ... +def open(filename: StrOrBytesPath) -> WalImageFile: ... quake2palette: bytes