-
Notifications
You must be signed in to change notification settings - Fork 0
Update test.py #5
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,13 +1,7 @@ | ||||||||||||||||||||||||||
| from azure.identity import DefaultAzureCredential | ||||||||||||||||||||||||||
| from azure.mgmt.containerregistry import ContainerRegistryManagementClient | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Set your Azure subscription ID | ||||||||||||||||||||||||||
| subscription_id = "<your-subscription-id>" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Initialize credentials and ACR client | ||||||||||||||||||||||||||
| credential = DefaultAzureCredential() | ||||||||||||||||||||||||||
| acr_client = ContainerRegistryManagementClient(credential, subscription_id) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Set your Azure subscr | ||||||||||||||||||||||||||
| # List all container registries in the subscription | ||||||||||||||||||||||||||
| registries = acr_client.registries.list() | ||||||||||||||||||||||||||
|
Comment on lines
+4
to
6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing Azure client initialization causes runtime failure. The code references Restore the missing initialization code: -# Set your Azure subscr
+# Set your Azure subscription ID
+subscription_id = "your-subscription-id"
+
+# Initialize credentials and client
+credential = DefaultAzureCredential()
+acr_client = ContainerRegistryManagementClient(credential, subscription_id)
+
# List all container registries in the subscription📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.14.7)6-6: Undefined name (F821) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete comment.
The comment appears to be truncated mid-word. Please complete or remove this comment.
🤖 Prompt for AI Agents