From 6b41e17949413201bcc415624a7f0c2eedf70c2f Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 15 Jun 2022 17:02:21 -0600 Subject: [PATCH] Remove several assignments to underscore Underscore is used with the gettext integration, so remove these otherwise-harmless assignments that are intended as disposal of an unused variable. --- console_conf/controllers/identity.py | 2 +- subiquitycore/lsb_release.py | 2 +- subiquitycore/ui/stretchy.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/console_conf/controllers/identity.py b/console_conf/controllers/identity.py index 245eb42e..b021509c 100644 --- a/console_conf/controllers/identity.py +++ b/console_conf/controllers/identity.py @@ -42,7 +42,7 @@ def get_core_version(): version = None for line in shlex.split(content): - key, _, value = line.partition("=") + key, sep, value = line.partition("=") if key == "ID" and value != "ubuntu-core": return None if key == "VERSION_ID": diff --git a/subiquitycore/lsb_release.py b/subiquitycore/lsb_release.py index 0714092b..2e970041 100644 --- a/subiquitycore/lsb_release.py +++ b/subiquitycore/lsb_release.py @@ -23,7 +23,7 @@ def lsb_release(path=None, dry_run: bool = False) -> Dict[str, str]: return ret for tok in shlex.split(content): - k, _, v = tok.partition("=") + k, sep, v = tok.partition("=") if not k.startswith("DISTRIB_") or not v: continue ret[k.replace("DISTRIB_", "").lower()] = v diff --git a/subiquitycore/ui/stretchy.py b/subiquitycore/ui/stretchy.py index 891843d5..6aeb807a 100644 --- a/subiquitycore/ui/stretchy.py +++ b/subiquitycore/ui/stretchy.py @@ -163,7 +163,7 @@ class StretchyOverlay(urwid.Widget): if not bottom_c.cols() or not bottom_c.rows(): return urwid.CompositeCanvas(bottom_c) - top_size, _ = self._top_size(size, focus) + top_size = self._top_size(size, focus)[0] top_c = self.top_w.render(top_size, focus) top_c = urwid.CompositeCanvas(top_c) left = (size[0] - top_size[0]) // 2