mypy 没有获取已安装的存根

Elo*_*off 7 python mypy

我已经安装了 boto3、boto3-stubs 和 mypy:

管道文件:

"boto3" = "*"
boto3-stubs = {extras = ["ec2", "s3"], version = "*"}
mypy = "*"
Run Code Online (Sandbox Code Playgroud)

但运行mypy .却报错:

error: Skipping analyzing 'boto3': found module but no type hints or library stubs
Run Code Online (Sandbox Code Playgroud)

我需要为 mypy 配置一些东西来查找存根吗?

我正在使用 python 3.8.6、mypy 0.790、boto3 1.16.59、boto3-stubs 1.16.59 全部安装在虚拟环境中。

小智 4

安装boto3 存根

python3 -m pip install boto3-stubs
Run Code Online (Sandbox Code Playgroud)