mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed ruff in backend
This commit is contained in:
1 parent
173da217d6
commit
5da8ead2ff
6 files changed
+11
-20
No files matched your search
@@ -42,9 +42,7 @@ class Command(BaseCommand):
|
||||
referenced_dirs: set[str] = set()
|
||||
legacy_image_files: set[str] = set()
|
||||
|
||||
for flavor in Flavor.objects.all().only(
|
||||
"local_image_paths", "main_image_path", "image"
|
||||
):
|
||||
for flavor in Flavor.objects.all().only("local_image_paths", "main_image_path", "image"):
|
||||
paths = list(flavor.local_image_paths or [])
|
||||
if flavor.main_image_path:
|
||||
paths.append(flavor.main_image_path)
|
||||
@@ -86,7 +84,9 @@ class Command(BaseCommand):
|
||||
entry.unlink()
|
||||
|
||||
verb = "Would delete" if dry_run else "Deleted"
|
||||
self.stdout.write(self.style.SUCCESS(f"{verb}: {len(deleted_dirs)} dirs, {len(deleted_files)} files"))
|
||||
self.stdout.write(
|
||||
self.style.SUCCESS(f"{verb}: {len(deleted_dirs)} dirs, {len(deleted_files)} files")
|
||||
)
|
||||
for path in deleted_dirs:
|
||||
self.stdout.write(f" dir {path}")
|
||||
for path in deleted_files:
|
||||
|
||||
Reference in new issue
Block a user