I am building a project based on telethon library. I would like to use the optional typing with mypy, but it fails on all telethon imports
error: Skipping analyzing "telethon.tl.types": found module but no type hints or library stubs
I can see that there are some type hints in class'es constructors in telethon.tl.types
.
I tried installing type hints with mypy --install-types
, but no luck here.
Is it possible to use telethon in my project and benefit from the type annotations?
Edit: A simple test case to recreate the issue
from telethon.tl.types import WebPage
def example(example: WebPage) -> str:
a: str = example.url
return a