Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,12 @@ def progress_callback(current, total):
progress_message = 'Uploading {} {}%'.format(progress_bar, percents)
cmd.cli_ctx.get_progress_controller().add(message=progress_message)

blob_client = container_client.upload_blob(blob_name, src, validate_content=True, progress_hook=progress_callback)
blob_client = None
import os
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

The import os statement should be moved to the top of the file with other imports rather than being placed within the function. This follows Python best practices for import organization.

Copilot uses AI. Check for mistakes.
with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs:
zip_content = fs.read()
blob_client = container_client.upload_blob(blob_name, zip_content, validate_content=True,
progress_hook=progress_callback)
Comment on lines +1669 to +1674
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

The variable blob_client = None initialization on line 1669 is unnecessary since blob_client is immediately assigned a value within the with statement context.

Copilot uses AI. Check for mistakes.

now = datetime.datetime.utcnow()
blob_start = now - datetime.timedelta(minutes=10)
Expand Down