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
4 changes: 1 addition & 3 deletions src/cloudforet/cost_analysis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ def __get_secret_data(secret_data: dict, task_options: dict) -> dict:
if len(secrets) == 1:
return secrets[0]

billing_tenant_id = task_options["billing_tenant_id"]

for _secret_data in secrets:
if _secret_data["tenant_id"] == billing_tenant_id:
if _secret_data["tenant_id"] == task_options.get("billing_tenant_id"):
Comment on lines 205 to +206
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

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

[nitpick] Cache task_options.get("billing_tenant_id") in a local variable before the loop to avoid repeated dictionary lookups and improve readability.

Copilot uses AI. Check for mistakes.
return _secret_data

elif _secret_data.get("subscription_id") and _secret_data.get(
Expand Down
Loading