-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
- Package Name: azure.storage.queue
- Package Version: 12.1.1
- Operating System: MacOS 10.15.4 (19E287)
- Python Version: 3.8.2
Describe the bug
This code implies that azure.storage.queue.QueueClient.from_connection_string() returns None:
azure-sdk-for-python/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py
Lines 155 to 161 in ab4f309
| def from_connection_string( | |
| cls, conn_str, # type: str | |
| queue_name, # type: str | |
| credential=None, # type: Any | |
| **kwargs # type: Any | |
| ): | |
| # type: (...) -> None |
In contrast, azure.storage.blob.BlobClient.from_connection_string() returns a BlobClient.
azure-sdk-for-python/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
Lines 235 to 242 in ab4f309
| def from_connection_string( | |
| cls, conn_str, # type: str | |
| container_name, # type: str | |
| blob_name, # type: str | |
| snapshot=None, # type: Optional[str] | |
| credential=None, # type: Optional[Any] | |
| **kwargs # type: Any | |
| ): # type: (...) -> BlobClient |
To Reproduce
Steps to reproduce the behavior:
- In editor (eg PyCharm):
a = azure.storage.queue.QueueClient.from_connection_string()
a.<TAB>
- Observe unhelpful autocomplete.
- Add a comment
# type: QueueClient - Get useful autocomplete
- Now get
Expected type 'QueueClient', got 'None' insteadcomplaint.
Expected behavior
Correct type declaration of QueueClient. Or, at the very least, not an incorrect & affirmative declared type of None.
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.