openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
18 stars 16 forks source link

Type hints of `convert_image` are too restrictive #121

Closed benoit74 closed 4 months ago

benoit74 commented 5 months ago

Type hints on convert_image function are way too restrictive, it looks like src and dst can as well be io.BytesIO and probably many other types.

See https://github.com/openzim/warc2zim/blob/3b3ec7d7d9f19dc797afebadf3b7326de4d372c2/src/warc2zim/converter.py#L456 for a sample usage where the type checker complains.

benoit74 commented 4 months ago

Duplicate of #112