Skip to content

Conversation

@weirongw23-msft
Copy link
Member

@weirongw23-msft weirongw23-msft commented Oct 24, 2025

Solves #43601

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 24, 2025
@weirongw23-msft weirongw23-msft marked this pull request as ready for review October 24, 2025 08:22
Copilot AI review requested due to automatic review settings October 24, 2025 08:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes mypy regressions in the Azure Storage SDK by adding explicit type annotations for instance attributes across Blob, Queue, and File Share client classes.

Key changes:

  • Added type annotations to client classes to satisfy mypy type checking requirements
  • Added property access statements in sample code to ensure the annotated attributes are validated by mypy

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py Added queue_name: str attribute annotation to QueueClient
sdk/storage/azure-storage-queue/azure/storage/queue/aio/_queue_client_async.py Added queue_name: str attribute annotation to async QueueClient
sdk/storage/azure-storage-queue/samples/queue_samples_hello_world.py Added property access to validate queue_name attribute
sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py Added property access to validate queue_name attribute
sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.pyi Added type annotations for share_name, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.pyi Added type annotations for share_name, file_name, file_path, directory_path, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.pyi Added type annotations for share_name, directory_path, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.pyi Added type annotations for share_name, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.pyi Added type annotations for share_name, file_name, file_path, directory_path, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_directory_client_async.pyi Added type annotations for share_name, directory_path, allow_trailing_dot, allow_source_trailing_dot, and file_request_intent
sdk/storage/azure-storage-file-share/samples/file_samples_share.py Added property accesses to validate ShareClient attributes
sdk/storage/azure-storage-file-share/samples/file_samples_share_async.py Added property accesses to validate async ShareClient attributes
sdk/storage/azure-storage-file-share/samples/file_samples_hello_world.py Added property accesses to validate ShareFileClient attributes
sdk/storage/azure-storage-file-share/samples/file_samples_hello_world_async.py Added property accesses to validate async ShareFileClient attributes
sdk/storage/azure-storage-file-share/samples/file_samples_directory.py Added property accesses to validate ShareDirectoryClient attributes
sdk/storage/azure-storage-file-share/samples/file_samples_directory_async.py Added property accesses to validate async ShareDirectoryClient attributes
sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.pyi Added type annotations for container_name, blob_name, snapshot, and version_id
sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.pyi Added type annotations for container_name, blob_name, snapshot, and version_id
sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py Added property accesses to validate BlobClient and ContainerClient attributes
sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py Added property accesses to validate async BlobClient and ContainerClient attributes

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-storage-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mypy regression in blob SDK for blob_name/container_name properties

1 participant