From f09d42433f2961fd81e9cfb44e0111cb15bb7e67 Mon Sep 17 00:00:00 2001 From: OneNewDev Date: Sat, 28 May 2022 15:17:33 +0200 Subject: [PATCH] typo --- tagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tagger.py b/tagger.py index b478680..78586a7 100644 --- a/tagger.py +++ b/tagger.py @@ -11,7 +11,7 @@ OUTPUT_FILE = 'tags.json' TAGS_PER_ARTICLE = 5 JSON_INDENT = 2 -upper_check = re.compile(r'[A-Z]') +UPPER_CHECK = re.compile(r'[A-Z]') @dataclass @@ -48,7 +48,7 @@ class FileScanner(HTMLParser): score *= 4 if len(word) <= 3: score //= 2 - upper_letters_count = len(upper_check.findall(tag_name)) + upper_letters_count = len(UPPER_CHECK.findall(tag_name)) score += upper_letters_count * 5 if word not in words_with_usage: words_with_usage[word] = Tag(name=tag_name, score=score)