Skip to content

Type hints of convert_image is not correct. #112

@FledgeXu

Description

@FledgeXu

For now the type hints of convert_image is:

def convert_image(
    src: pathlib.Path, dst: pathlib.Path, **params: Optional[dict]
) -> None:

But we can use io.BytesIO() as src and dst.
Also, When I try to put the fmt="PNG" as a parameter, the Pyright will complain : Type "Literal['PNG']" cannot be assigned to type "dict[Unknown, Unknown] | None

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions