standardebooks / tools

The Standard Ebooks toolset for producing our ebook files.
Other
1.42k stars 125 forks source link

mypy stubs for pillow and cairosvg #248

Closed acabal closed 4 years ago

acabal commented 4 years ago

@hallidave I'm working on removing the imagemagick and libsrvg external dependencies in favor of pillow and cairosvg pip packages here: https://github.com/standardebooks/tools/tree/rsvg

However mypy dies with:

se/images.py:12: error: No library stub file for module 'PIL'
se/images.py:12: note: (Stub files are from https://github.com/python/typeshed)
se/se_epub_build.py:24: error: Cannot find implementation or library stub for module named 'cairosvg'
se/se_epub_build.py:24: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
se/se_epub_build.py:25: error: No library stub file for module 'PIL'
Found 3 errors in 2 files (checked 78 source files)

Do you know how to fix this?

hallidave commented 4 years ago

Just add those modules to the list above the "ignore missing imports" flag in mypy.ini.

acabal commented 4 years ago

OK, thanks. Just wanted to make sure there wasn't a better way to get checks for them.