Skip to content

Pillow 10.4.0 reveals improper type hints for image probing functions #177

@benoit74

Description

@benoit74

Pyright error is:

openzim/python-scraperlib/src/zimscraperlib/image/probing.py:81:30 - error: Argument of type "BytesIO | Path | IOBase" cannot be assigned to parameter "fp" of type "StrOrBytesPath | IO[bytes]" in function "open" (reportArgumentType)

pillow has updated its type hint in 10.4.0 and reveals this flaw.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions