From fbaba0f49901fad58acb381d7e574b8de7d8f302 Mon Sep 17 00:00:00 2001 From: stephenmk Date: Sun, 23 Apr 2023 00:34:46 -0500 Subject: [PATCH] Protect attribute --- bot/yomichan/terms/jitenon.py | 6 +++--- bot/yomichan/terms/terminator.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bot/yomichan/terms/jitenon.py b/bot/yomichan/terms/jitenon.py index 56b8841..3a0388b 100644 --- a/bot/yomichan/terms/jitenon.py +++ b/bot/yomichan/terms/jitenon.py @@ -11,10 +11,10 @@ class JitenonTerminator(Terminator): return None def _glossary(self, entry): - if entry.entry_id in self.glossary_cache: - return self.glossary_cache[entry.entry_id] + if entry.entry_id in self._glossary_cache: + return self._glossary_cache[entry.entry_id] glossary = make_glossary(entry) - self.glossary_cache[entry.entry_id] = glossary + self._glossary_cache[entry.entry_id] = glossary return glossary def _sequence(self, entry): diff --git a/bot/yomichan/terms/terminator.py b/bot/yomichan/terms/terminator.py index af15c3f..876e8aa 100644 --- a/bot/yomichan/terms/terminator.py +++ b/bot/yomichan/terms/terminator.py @@ -1,6 +1,6 @@ class Terminator: def __init__(self): - self.glossary_cache = {} + self._glossary_cache = {} def make_terms(self, entry): terms = []