commit:     8404693138445a5f5e0cd0b385815fd9eeeb7e22
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Fri Oct  6 00:43:38 2023 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Fri Oct  6 00:46:00 2023 +0000
URL:        https://gitweb.gentoo.org/proj/elogv.git/commit/?id=84046931

elogv: Address linter issues

* Remove unused variables.
* Rename l to output_line and wrapped_line to wrapped_lines for clarity.

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>

 elogv | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/elogv b/elogv
index eb3a2d2..70346e9 100755
--- a/elogv
+++ b/elogv
@@ -92,7 +92,7 @@ for category, variable in _LOCALE_CATEGORY_PAIRS:
 
     try:
         locale.getlocale(category)
-    except ValueError as e:
+    except ValueError:
         value = os.environ[variable]
         if value in reported_bad_locales:
             continue
@@ -569,7 +569,6 @@ class ElogViewer:
         """
         Takes a file-like object and wraps long lines. Returns a list iterator.
         """
-        result = []
         self.logf.seek(0)
         for line in self.logf.readlines():
             if not line.strip():
@@ -577,9 +576,9 @@ class ElogViewer:
                 yield "\n"
             else:
                 # Returns a list of new lines minus the line ending \n
-                wrapped_line = textwrap.wrap(line, width=self.width - 2)
-                for l in wrapped_line:
-                    yield l + "\n"
+                wrapped_lines = textwrap.wrap(line, width=self.width - 2)
+                for output_line in wrapped_lines:
+                    yield output_line + "\n"
 
     def show_log(self):
         """

Reply via email to