From 9931c6fa757f0b913292dbe3f4d06fb16fb9febc Mon Sep 17 00:00:00 2001 From: asagi4 <130366179+asagi4@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:13:26 +0200 Subject: [PATCH] These should be initialized to None, see #143 --- prompt_control/attention_couple_ppm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prompt_control/attention_couple_ppm.py b/prompt_control/attention_couple_ppm.py index d5f4e8c..7d87722 100644 --- a/prompt_control/attention_couple_ppm.py +++ b/prompt_control/attention_couple_ppm.py @@ -71,7 +71,8 @@ class AttentionCoupleHook(TransformerOptionsHook): } self.has_negpip = False # calculate later. All clones must refer to the same kv dict - self.kv = {"k": [], "v": []} + # The type is here to shut up the type checker + self.kv: dict[str, list] = {"k": None, "v": None} def initialize_regions(self, base_cond, conds, fill): self.num_conds = len(conds) + 1