Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stubtest to validate PIL.FpxImagePlugin and PIL.MicImagePlugin #9531

Merged
merged 6 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions stubs/Pillow/PIL/FpxImagePlugin.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any, ClassVar
from typing_extensions import Literal, TypeAlias

Expand All @@ -13,4 +14,9 @@ class FpxImageFile(ImageFile):
format: ClassVar[Literal["FPX"]]
format_description: ClassVar[str]
fp: _OleStream | None
maxid: int
rawmode: str
jpeg: dict[int, Incomplete]
tile_prefix: Incomplete
stream: list[str]
def load(self): ...
7 changes: 5 additions & 2 deletions stubs/Pillow/PIL/MicImagePlugin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ _OleStream: TypeAlias = Any # olefile.OleStream
class MicImageFile(TiffImageFile):
ole: _OleFileIO
format: ClassVar[Literal["MIC"]]
format_description: ClassVar[str]
fp: _OleStream
frame: int
frame: int | None
images: list[str]
is_animated: bool
def seek(self, frame: int) -> None: ...
def tell(self) -> int: ...
def tell(self) -> int | None: ... # type: ignore[override]