From 48d9a8b5d299160f0d48440f5544f0f786caec97 Mon Sep 17 00:00:00 2001 From: Emmy D'ANELLO Date: Mon, 29 Aug 2022 11:17:17 +0200 Subject: [PATCH] =?UTF-8?q?Replace=20...=20by=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emmy D'ANELLO --- README.md | 2 +- management/commands/force_delete_user.py | 16 ++++++++-------- management/commands/import_account.py | 2 +- management/commands/import_transaction.py | 4 ++-- management/commands/make_su.py | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7548965..34ddfd3 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ * `--bus BUS` : filtre par bus, en récupérant uniquement les inscriptions sur un bus. Par défaut, on affiche tous les bus. * `--team TEAM` : filtre par équipe, en récupérant uniquement les inscriptions sur une équipe. Par défaut, on - affiche toutes les équipes. Entrer `"none"` filtre les inscriptions sans équipe (chefs de bus, ...) + affiche toutes les équipes. Entrer `"none"` filtre les inscriptions sans équipe (chefs de bus,…) * `--sep` : définit le caractère de séparation des colonnes du fichier CSV. Par défaut, il s'agit du caractère `|`. Merci de ne pas rentrer plus d'un caractère. diff --git a/management/commands/force_delete_user.py b/management/commands/force_delete_user.py index 78e8d48..94d0434 100644 --- a/management/commands/force_delete_user.py +++ b/management/commands/force_delete_user.py @@ -57,13 +57,13 @@ class Command(BaseCommand): if user_id.isnumeric(): qs = User.objects.filter(pk=int(user_id)) if not qs.exists(): - self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring...")) + self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring…")) continue user = qs.get() else: qs = Alias.objects.filter(normalized_name=Alias.normalize(user_id), note__noteuser__isnull=False) if not qs.exists(): - self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring...")) + self.stderr.write(self.style.WARNING(f"User {user_id} was not found. Ignoring…")) continue user = qs.get().note.user @@ -80,7 +80,7 @@ class Command(BaseCommand): local_deleted += list(transactions) for tr in transactions: if kwargs['verbosity'] >= 1: - self.stdout.write(f"Removing {tr}...") + self.stdout.write(f"Removing {tr}…") if force: tr.delete() @@ -89,7 +89,7 @@ class Command(BaseCommand): local_deleted += list(memberships) if kwargs['verbosity'] >= 1: for membership in memberships: - self.stdout.write(f"Removing {membership}...") + self.stdout.write(f"Removing {membership}…") if force: memberships.delete() @@ -98,7 +98,7 @@ class Command(BaseCommand): local_deleted += list(alias_set) if kwargs['verbosity'] >= 1: for alias in alias_set: - self.stdout.write(f"Removing alias {alias}...") + self.stdout.write(f"Removing alias {alias}…") if force: alias_set.delete() @@ -110,7 +110,7 @@ class Command(BaseCommand): local_deleted += list(entries) if kwargs['verbosity'] >= 1: for entry in entries: - self.stdout.write(f"Removing {entry}...") + self.stdout.write(f"Removing {entry}…") if force: entries.delete() @@ -119,7 +119,7 @@ class Command(BaseCommand): local_deleted += list(guests) if kwargs['verbosity'] >= 1: for guest in guests: - self.stdout.write(f"Removing guest {guest}...") + self.stdout.write(f"Removing guest {guest}…") if force: guests.delete() @@ -131,7 +131,7 @@ class Command(BaseCommand): local_deleted += list(credits) if kwargs['verbosity'] >= 1: for credit in credits: - self.stdout.write(f"Removing {credit}...") + self.stdout.write(f"Removing {credit}…") if force: credits.delete() diff --git a/management/commands/import_account.py b/management/commands/import_account.py index 53847d7..83b05f2 100644 --- a/management/commands/import_account.py +++ b/management/commands/import_account.py @@ -214,7 +214,7 @@ class Command(ImportCommand): pk_alias = Alias.objects.order_by('-id').first().id + 1 for idx, row in enumerate(cur): alias_name = row["alias"] - alias_name = (alias_name[:252] + '...') if len(alias_name) > 255 else alias_name + alias_name = (alias_name[:254] + '…') if len(alias_name) > 255 else alias_name alias_norm = Alias.normalize(alias_name) self.update_line(idx, n, alias_norm) # clean pseudo (normalized pseudo must be unique) diff --git a/management/commands/import_transaction.py b/management/commands/import_transaction.py index aec3985..3698ade 100644 --- a/management/commands/import_transaction.py +++ b/management/commands/import_transaction.py @@ -102,7 +102,7 @@ class Command(ImportCommand): def _basic_transaction(self, row, obj_dict, child_dict): if len(row["description"]) > 255: - obj_dict["reason"] = obj_dict["reason"][:250] + "...)" + obj_dict["reason"] = obj_dict["reason"][:252] + "…)" return obj_dict, None, None def _template_transaction(self, row, obj_dict, child_dict): @@ -221,7 +221,7 @@ class Command(ImportCommand): "valid": row["valide"], } if len(obj_dict["reason"]) > 255: - obj_dict["reason"] = obj_dict["reason"][:252] + "..." + obj_dict["reason"] = obj_dict["reason"][:254] + "…" # for child transaction Models child_dict = {"pk": pk_transaction} ttype = row["type"] diff --git a/management/commands/make_su.py b/management/commands/make_su.py index 348a3f2..12fce10 100644 --- a/management/commands/make_su.py +++ b/management/commands/make_su.py @@ -17,10 +17,10 @@ class Command(BaseCommand): user.is_active = True if kwargs['STAFF']: if kwargs['verbosity'] > 0: - self.stdout.write(f"Add {user} to staff users...") + self.stdout.write(f"Add {user} to staff users…") user.is_staff = True if kwargs['SUPER']: if kwargs['verbosity'] > 0: - self.stdout.write(f"Add {user} to superusers...") + self.stdout.write(f"Add {user} to superusers…") user.is_superuser = True user.save()