From eff8d78d18fc04cd34d306e5e7ae5082305f5909 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 23 Jan 2025 10:41:35 +0000 Subject: [PATCH] :fire: Drop an unused variable I think the storage of binding data to `binding` is a hangover from some version of this code; it isn't used so remove it. Also ensure that the key that is returned is stripped of any surrounding whitespace. --- src/braindrop/app/commands/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/braindrop/app/commands/base.py b/src/braindrop/app/commands/base.py index 13bdc2a..9444c31 100644 --- a/src/braindrop/app/commands/base.py +++ b/src/braindrop/app/commands/base.py @@ -92,8 +92,8 @@ def key_binding(cls) -> str: if isinstance(key := cls.BINDING_KEY, tuple): key, *_ = key if isinstance(key, str): - key, _, _ = (binding := cls.binding()).key.partition(",") - return key or "" + key, _, _ = cls.binding().key.partition(",") + return (key or "").strip() @classmethod def action_name(cls) -> str: