From 8f304f1c48c6570f984bc92a722a7614e294ba52 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Sat, 13 Jul 2024 12:43:03 +0800 Subject: [PATCH] There should be no need for enumerate() --- Whatsapp_Chat_Exporter/contacts_names_from_vcards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Whatsapp_Chat_Exporter/contacts_names_from_vcards.py b/Whatsapp_Chat_Exporter/contacts_names_from_vcards.py index 9784ebf..e3cb30f 100644 --- a/Whatsapp_Chat_Exporter/contacts_names_from_vcards.py +++ b/Whatsapp_Chat_Exporter/contacts_names_from_vcards.py @@ -13,12 +13,12 @@ class ContactsNamesFromVCards: self.l = readVCardsFile(vcfFilePath, default_country_calling_code) def enrich_names_from_vCards(self, chats): - for counter, (number, name) in enumerate(self.l): + for number, name in self.l: # short number must be a bad contact, lets skip it if len(number) <= 5: continue - for counter, chat in enumerate(filter_dict_by_prefix(chats, number).values()): + for chat in filter_dict_by_prefix(chats, number).values(): if not hasattr(chat, 'name') or (hasattr(chat, 'name') and chat.name is None): setattr(chat, 'name', name)