我正在建立一个基于telethon图书馆的项目。我想在mypy中使用可选的输入,但在所有telethon导入中都失败了
error: Skipping analyzing "telethon.tl.types": found module but no type hints or library stubs
我可以看到telethon.tl.types
中的类构造函数中有一些类型提示
我尝试用mypy --install-types
安装类型提示,但在这里运气不佳
是否可以在我的项目中使用telethon并从类型注释中获益
编辑: 用于重新创建问题的简单测试用例
from telethon.tl.types import WebPage
def example(example: WebPage) -> str:
a: str = example.url
return a
目前没有回答
相关问题 更多 >
编程相关推荐