ruff rules UP008 and UP009

This commit is contained in:
thomas girod
2024-06-27 14:46:43 +02:00
parent 688871a680
commit cfc19434d0
258 changed files with 473 additions and 824 deletions

View File

@ -99,7 +99,7 @@ class Election(models.Model):
def delete(self, *args, **kwargs):
self.election_lists.all().delete()
super(Election, self).delete(*args, **kwargs)
super().delete(*args, **kwargs)
# Permissions
@ -169,7 +169,7 @@ class ElectionList(models.Model):
def delete(self):
for candidature in self.candidatures.all():
candidature.delete()
super(ElectionList, self).delete()
super().delete()
def __str__(self):
return self.title
@ -204,7 +204,7 @@ class Candidature(models.Model):
def delete(self):
for vote in self.votes.all():
vote.delete()
super(Candidature, self).delete()
super().delete()
def can_be_edited_by(self, user):
return (user == self.user) or user.can_edit(self.role.election)