Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type hint for azure.storage.queue.QueueClient.from_connection_string() -> None #11392

Closed
ellieayla opened this issue May 12, 2020 · 3 comments · Fixed by #13224
Closed
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Milestone

Comments

@ellieayla
Copy link

  • 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:

  1. In editor (eg PyCharm):
a = azure.storage.queue.QueueClient.from_connection_string()
a.<TAB>
  1. Observe unhelpful autocomplete.
  2. Add a comment # type: QueueClient
  3. Get useful autocomplete
  4. 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.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 12, 2020
@kaerm kaerm added bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 13, 2020
@ghost
Copy link

ghost commented May 13, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 13, 2020
@kaerm kaerm added the Client This issue points to a problem in the data-plane of the library. label May 13, 2020
@lmazuel lmazuel added this to the Backlog milestone May 18, 2020
@xiafu-msft
Copy link
Contributor

Hi @alanjcastonguay

Thanks for catching this, we will log this as a bug and fix it later!

@ellieayla
Copy link
Author

Shiny; thanks. 👍

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Jun 10, 2021
[StorageSync] Publish 2020-09-01 as stable API version (Azure#14407)

* DONOT COMMIT: Microsoft.StorageSync : Update Api Version 2020-09-01 (preview) for InitialUploadPolicy feature. (Azure#11392)

* update initialuploadpolicy

* Update test for InitialUploadPolicy setting

Co-authored-by: Manish Duggal <manidu@microsoft.com>

* [Microsoft.StorageSync] change enumeration protocol changes for 2020-09-01 (Azure#12793)

* change eumeration protocol changes

* fix unexpected changes

* StorageSync new api version 2020-09-01 (Azure#14005)

* change

* del

* revert

* Remove systemData changes (postponed to future API version)

* run prettier

* Address breaking changes and S360 item for default values

* run prettier

Co-authored-by: Andre Pinto <anpint@microsoft.com>

Co-authored-by: Manishd79 <duggal_sunny@yahoo.com>
Co-authored-by: Manish Duggal <manidu@microsoft.com>
Co-authored-by: ankushbindlish2 <34896519+ankushbindlish2@users.noreply.github.com>
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Jun 10, 2021
[StorageSync] Publish 2020-09-01 as stable API version (Azure#14407)

* DONOT COMMIT: Microsoft.StorageSync : Update Api Version 2020-09-01 (preview) for InitialUploadPolicy feature. (Azure#11392)

* update initialuploadpolicy

* Update test for InitialUploadPolicy setting

Co-authored-by: Manish Duggal <manidu@microsoft.com>

* [Microsoft.StorageSync] change enumeration protocol changes for 2020-09-01 (Azure#12793)

* change eumeration protocol changes

* fix unexpected changes

* StorageSync new api version 2020-09-01 (Azure#14005)

* change

* del

* revert

* Remove systemData changes (postponed to future API version)

* run prettier

* Address breaking changes and S360 item for default values

* run prettier

Co-authored-by: Andre Pinto <anpint@microsoft.com>

Co-authored-by: Manishd79 <duggal_sunny@yahoo.com>
Co-authored-by: Manish Duggal <manidu@microsoft.com>
Co-authored-by: ankushbindlish2 <34896519+ankushbindlish2@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants