Browse Source

Automatic formatting commit: 2020-06-14T14:36:53.793396

Getty Ritter 3 years ago
parent
commit
989a666a40
1 changed files with 6 additions and 4 deletions
  1. 6 4
      lc/model.py

+ 6 - 4
lc/model.py

@@ -337,10 +337,12 @@ class Tag(Model):
 
     @staticmethod
     def clean():
-        unused = Tag.select(Tag.id) \
-                    .join(HasTag, peewee.JOIN.LEFT_OUTER) \
-                    .group_by(Tag.name) \
-                    .having(peewee.fn.COUNT(HasTag.id) == 0)
+        unused = (
+            Tag.select(Tag.id)
+            .join(HasTag, peewee.JOIN.LEFT_OUTER)
+            .group_by(Tag.name)
+            .having(peewee.fn.COUNT(HasTag.id) == 0)
+        )
         Tag.delete().where(Tag.id.in_(unused)).execute()