Skip to content

Mypy doesn't work with azure-storage-blob #20083

@rnestler

Description

@rnestler
  • Package Name: azure-storage-blob
  • Package Version: 12.8.1
  • Operating System: Ubuntu 20.04
  • Python Version: 3.8.10

Describe the bug
If I want to use mypy to statically type check my Python code it fails to find the type information of the azure.storage.blob, despite that there are type comments in the module.

To Reproduce
Steps to reproduce the behavior:

  1. pip install azure-storage-blob==12.8.1 mypy==0.910
  2. echo "from azure.storage.blob import ContainerClient" > test.py
  3. mypy test.py
    test.py:1: error: Skipping analyzing "azure.storage.blob": found module but no type hints or library stubs
    test.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
    Found 1 error in 1 file (checked 1 source file)
    

Expected behavior
I expect mypy to find the type hints in the module.

Additional context

There seem to be type annotations in the code. I asked in the https://gitter.im/python/typing chat and was told that the issue is that there isn't a py.typed file in the package, which seems to be true, since I can't find it in lib/python3.8/site-packages/azure/storage/blob

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions