- 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:
|
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.
|
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' instead complaint.
Expected behavior
Correct type declaration of QueueClient. Or, at the very least, not an incorrect & affirmative declared type of None.
Describe the bug
This code implies that
azure.storage.queue.QueueClient.from_connection_string()returnsNone:azure-sdk-for-python/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py
Lines 155 to 161 in ab4f309
In contrast,
azure.storage.blob.BlobClient.from_connection_string()returns aBlobClient.azure-sdk-for-python/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
Lines 235 to 242 in ab4f309
To Reproduce
Steps to reproduce the behavior:
# type: QueueClientExpected 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.