导入插件 "sqlmypy" 时出错:没有名为 'sqlmypy' 的模块
Error importing plugin "sqlmypy": No module named 'sqlmypy'
我已经通过我的 Pipfile 安装了 sqlalchemy-stubs
:
[dev-packages]
sqlalchemy-stubs = {editable = true, git = "https://github.com/dropbox/sqlalchemy-stubs.git"}
验证人 运行 pipenv graph
:
sqlalchemy-stubs==0.4
- mypy [required: >=0.790, installed: 0.910]
- mypy-extensions [required: >=0.4.3,<0.5.0, installed: 0.4.3]
- toml [required: Any, installed: 0.10.2]
- typing-extensions [required: >=3.7.4, installed: 4.0.0]
- typing-extensions [required: >=3.7.4, installed: 4.0.0]
然而当 运行 mypy (mypy --strict .
) 与配置:
[mypy]
plugins = graphene_plugin, sqlmypy
我收到错误:
error: Error importing plugin "sqlmypy": No module named 'sqlmypy'
这是怎么回事?
我通过从 pipfile 中删除 editable = true
来修复。
我已经通过我的 Pipfile 安装了 sqlalchemy-stubs
:
[dev-packages]
sqlalchemy-stubs = {editable = true, git = "https://github.com/dropbox/sqlalchemy-stubs.git"}
验证人 运行 pipenv graph
:
sqlalchemy-stubs==0.4
- mypy [required: >=0.790, installed: 0.910]
- mypy-extensions [required: >=0.4.3,<0.5.0, installed: 0.4.3]
- toml [required: Any, installed: 0.10.2]
- typing-extensions [required: >=3.7.4, installed: 4.0.0]
- typing-extensions [required: >=3.7.4, installed: 4.0.0]
然而当 运行 mypy (mypy --strict .
) 与配置:
[mypy]
plugins = graphene_plugin, sqlmypy
我收到错误:
error: Error importing plugin "sqlmypy": No module named 'sqlmypy'
这是怎么回事?
我通过从 pipfile 中删除 editable = true
来修复。