From 3fc6be078c818a0ef1fdc6e59963e39a6e377284 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Wed, 28 Sep 2022 12:50:11 +0200 Subject: [PATCH] Linting --- apps/member/views.py | 1 - apps/note/models/transactions.py | 4 ++-- apps/note/tables.py | 5 +++-- apps/treasury/models.py | 30 +++++++++++++++--------------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/member/views.py b/apps/member/views.py index 08ed22f8..d4792f91 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -8,7 +8,6 @@ from django.contrib.auth import logout from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.contrib.auth.views import LoginView -from django.contrib.contenttypes.models import ContentType from django.db import transaction from django.db.models import Q, F from django.shortcuts import redirect diff --git a/apps/note/models/transactions.py b/apps/note/models/transactions.py index 3c6b4c7d..f405c920 100644 --- a/apps/note/models/transactions.py +++ b/apps/note/models/transactions.py @@ -325,8 +325,8 @@ class SpecialTransaction(Transaction): def clean(self): # SpecialTransaction are only possible with NoteSpecial object if self.is_credit() == self.is_debit(): - raise(ValidationError(_("A special transaction is only possible between a" - " Note associated to a payment method and a User or a Club"))) + raise (ValidationError(_("A special transaction is only possible between a" + " Note associated to a payment method and a User or a Club"))) @transaction.atomic def save(self, *args, **kwargs): diff --git a/apps/note/tables.py b/apps/note/tables.py index 0a0fd4ed..11d8ba78 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -172,6 +172,7 @@ class TrustTable(tables.Table): else '')}}, verbose_name=_("Delete"),) + class TrustedTable(tables.Table): class Meta: attrs = { @@ -184,7 +185,7 @@ class TrustedTable(tables.Table): show_header = False trusting = tables.Column(attrs={ - 'td': {'class': 'text-center', 'width':'100%'}}) + 'td': {'class': 'text-center', 'width': '100%'}}) trust_back = tables.Column( verbose_name=_("Trust back"), @@ -200,7 +201,7 @@ class TrustedTable(tables.Table): def render_trust_back(self, record): user_note = record.trusted trusting_note = record.trusting - if Trust.objects.filter(trusted=trusting_note, trusting=user_note) : + if Trust.objects.filter(trusted=trusting_note, trusting=user_note): return "" val = '