From 6bb26cd534ec00f096f283161f65fef0297a62ea Mon Sep 17 00:00:00 2001
From: "Bradley M. Small" <bradley_small@hotmail.com>
Date: Sat, 2 Nov 2019 11:53:39 -0400
Subject: [PATCH] applying lint changes

---
 justify.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/justify.py b/justify.py
index d169fa0..58b2329 100755
--- a/justify.py
+++ b/justify.py
@@ -43,7 +43,7 @@ def justify_text(text, width):
             line.append(word)
             length += wordlen
         else:
-            yield(apply_spacing(line, width))
+            yield apply_spacing(line, width)
             line = []
             line.append(word)
             length = wordlen
@@ -54,7 +54,7 @@ def justify_text(text, width):
 
     # Handles last line, and single word lines
     if line:
-        yield(apply_spacing(line, width))
+        yield apply_spacing(line, width)
 
 
 def apply_spacing(line, width, prepad=True):
@@ -78,8 +78,8 @@ def apply_spacing(line, width, prepad=True):
 
 def show_justified_text_as_array_lines(justified_text):
     """Show the justified with 'array number' headers."""
-    for i, e in enumerate(justified_text):
-        print(f'Array [{i+1}] = "{e}"')
+    for idx, text in enumerate(justified_text):
+        print(f'Array [{idx+1}] = "{text}"')
 
 
 def main():
@@ -90,7 +90,7 @@ def main():
     else:
         paragraph = """This is a sample text but a complicated problem to be
         solved, so we are adding more text to see that it actually works."""
-        page_width = 20
+        page_width = 14
 
     show_justified_text_as_array_lines(justify_text(paragraph, page_width))
 
-- 
GitLab