Reputation: 21688
I've installed boto3, boto3-stubs, and mypy:
Pipfile:
"boto3" = "*"
boto3-stubs = {extras = ["ec2", "s3"], version = "*"}
mypy = "*"
But running mypy .
gives the error:
error: Skipping analyzing 'boto3': found module but no type hints or library stubs
Do I need to configure something for mypy to find the stubs?
I'm using python 3.8.6, mypy 0.790, boto3 1.16.59, boto3-stubs 1.16.59 all installed in a virtual env.
Upvotes: 8
Views: 6657
Reputation: 21
I used venv and I got it to work using the following steps:
python3 -m venv venv
source venv/bin/activate
python3 -m pip install mypy 'boto3-stubs[ec2,s3]'
venv/bin/mypy .
If you're using VSCode then select the right interpreter using: Python: Select interpreter
I use venv so I pointed to ./venv/bin/python
Upvotes: 2