From 425b8588fdb83cddaecb18c6822d27c470f45d51 Mon Sep 17 00:00:00 2001 From: OneNewDev Date: Sat, 28 May 2022 14:50:00 +0200 Subject: [PATCH] minimal performance improvement --- tagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tagger.py b/tagger.py index d4332b2..cd7bd94 100644 --- a/tagger.py +++ b/tagger.py @@ -38,9 +38,9 @@ class FileScanner(HTMLParser): title_words = set(self.file.parent.name.split('-')) for word in words: tag_name = word.strip(".,:;!\"'<>()") - word = tag_name.lower() - if not word: + if not tag_name: continue + word = tag_name.lower() score = 10 if word in EXCLUDED_WORDS: score = 0