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

Type hints incorrect for BlobClient.delete_blob() #13261

Closed
howardjones opened this issue Aug 21, 2020 · 2 comments · Fixed by #14001
Closed

Type hints incorrect for BlobClient.delete_blob() #13261

howardjones opened this issue Aug 21, 2020 · 2 comments · Fixed by #14001
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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)

Comments

@howardjones
Copy link
Contributor

  • Package Name: azure-storage-blob
  • Package Version: 12.4.0
  • Operating System: Linux (ubuntu 18 LTS)
  • Python Version: 3.8.0

Describe the bug
A clear and concise description of what the bug is.

Docs for BlobClient.delete_blob() say that it takes a string parameter for delete_snapshots. The type hints on the function itself say that this is a bool.

https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#delete-blob-delete-snapshots-false----kwargs-

 @distributed_trace
    def delete_blob(self, delete_snapshots=False, **kwargs):
        # type: (bool, **Any) -> None

Expected behavior
A clear and concise description of what you expected to happen.

The docs should reflect reality. My IDE shouldn't flag my valid code as incorrect.

@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 Aug 21, 2020
@kaerm kaerm added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Aug 24, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 24, 2020
@xiafu-msft xiafu-msft added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 25, 2020
@xiafu-msft
Copy link
Contributor

xiafu-msft commented Aug 25, 2020

Hi @howardjones

Thanks for catching this! We will make the the type hints on the function correct. It should be like this

 @distributed_trace
    def delete_blob(self, delete_snapshots="", **kwargs):
        # type: (str, **Any) -> None

@tasherif-msft
Copy link
Contributor

The PR for the change has been merged and will be in our next release. Thank you

@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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants