【发布时间】:2019-01-19 10:32:04
【问题描述】:
如果我在上面运行 mypy,基本上,安装了 flask_api 和 flask_sqlalchemy(通过 pip3)
import flask_sqalchemy
import flask_api
错误信息是这样的
testMypy.py:1: error: No library stub file for module 'flask_sqlalchemy'
testMypy.py:1: note: (Stub files are from https://github.com/python/typeshed)
testMypy.py:2: error: Cannot find module named 'flask_api'
testMypy.py:2: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
现在,我确实知道,截至 2019 年 1 月 19 日,flask_sqlalchemy 和 flask_api 在 typeshed 中没有存根文件(还),但我认为如果两个模块都安装在系统中,错误消息应该是“模块没有库存根文件..”,这两者有什么区别?
【问题讨论】:
标签: python-3.x flask flask-sqlalchemy mypy