Skip to content

Commit

Permalink
Formatted with black
Browse files Browse the repository at this point in the history
  • Loading branch information
johnathan-rodriguez committed Dec 20, 2024
1 parent 6433cd8 commit 8d6ad5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def process_campaign(client, campaign_id, budget_data):
)

return {
"errors": []
if len(valid_budgets.items) == len(budgets.items)
else [campaign_id],
"errors": (
[] if len(valid_budgets.items) == len(budgets.items) else [campaign_id]
),
"report": {campaign_id: report},
}

Expand Down
4 changes: 1 addition & 3 deletions shipyard_blueprints/magnite/shipyard_magnite/magnite.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ def export_campaign_by_id(self, id: str, filename: str = None):
if isinstance(campaign_data, list):
df = pd.json_normalize(campaign_data)
else:
df = pd.json_normalize(
[campaign_data]
)
df = pd.json_normalize([campaign_data])

df.to_csv(filename, index=False)
elif file_type == "json":
Expand Down
1 change: 0 additions & 1 deletion shipyard_blueprints/magnite/shipyard_magnite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ def transform_data_to_budgets(raw_data):
Budgets: A Budgets object.
"""
return Budgets(items=[transform_data_to_budget_item(item) for item in raw_data])

0 comments on commit 8d6ad5d

Please sign in to comment.