Skip to main content
 首页 » 编程设计

python之python 中没有模块 lxml.html 的库 stub 文件

2024年09月07日31insus

添加此行 import lxml.html 后,vim 显示 No library stub file for module lxml.html。

这是什么意思?

请您参考如下方法:

Mypy 使用名为 TypeShed 的包。 Typeshed 包含 python 标准库和一些第三方包的类型 stub 。 lxml 没有在那里表示。所以类型检查器不知道 lxml 中的类型。

stub 在这里解释:https://github.com/python/mypy/wiki/Creating-Stubs-For-Python-Modules