Reformatting everything with black

This commit is contained in:
Ian Roddis committed 2026-07-14 14:36:49 -03:00
1 parent 7bd07f084a
commit 8185f1f8b3
48 files changed
+1000 -348

No files matched your search

+22 -6
View File
@@ -44,9 +44,14 @@ async def create_augmented_part(
sub_part_type_id=payload.sub_part_type_id,
)
await audit_crud.log(
db, actor=actor, action="create", resource_type="AugmentedPart",
db,
actor=actor,
action="create",
resource_type="AugmentedPart",
resource_id=ap.id,
description=audit_crud.describe_create("AugmentedPart", ap.id, ap.sku or ap.description),
description=audit_crud.describe_create(
"AugmentedPart", ap.id, ap.sku or ap.description
),
)
return ap
@@ -58,7 +63,10 @@ async def sync_augmented_parts(
):
result = await augmented_part_sync.sync(db)
await audit_crud.log(
db, actor=actor, action="update", resource_type="AugmentedPart",
db,
actor=actor,
action="update",
resource_type="AugmentedPart",
resource_id=None,
description=(
f"Sync: {result.created} created, {result.deleted} deleted, "
@@ -93,7 +101,10 @@ async def update_augmented_part(
changes = payload.model_dump(exclude_unset=True)
ap = await augmented_part_crud.update(db, ap, changes)
await audit_crud.log(
db, actor=actor, action="update", resource_type="AugmentedPart",
db,
actor=actor,
action="update",
resource_type="AugmentedPart",
resource_id=ap.id,
description=audit_crud.describe_update("AugmentedPart", ap.id, changes),
)
@@ -112,7 +123,12 @@ async def delete_augmented_part(
label = ap.sku or ap.description
await augmented_part_crud.delete(db, ap)
await audit_crud.log(
db, actor=actor, action="delete", resource_type="AugmentedPart",
db,
actor=actor,
action="delete",
resource_type="AugmentedPart",
resource_id=augmented_part_id,
description=audit_crud.describe_delete("AugmentedPart", augmented_part_id, label),
description=audit_crud.describe_delete(
"AugmentedPart", augmented_part_id, label
),
)