From 713a609bd19d491de03debf8a4a6ddf2540b13dc Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 3 Feb 2022 14:18:37 -0800 Subject: Change settings in flake8 and black. --- text_utils.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'text_utils.py') diff --git a/text_utils.py b/text_utils.py index 534813c..d9bb652 100644 --- a/text_utils.py +++ b/text_utils.py @@ -126,9 +126,7 @@ def distribute_strings( subwidth = math.floor(width / len(strings)) retval = "" for string in strings: - string = justify_string( - string, width=subwidth, alignment=alignment, padding=padding - ) + string = justify_string(string, width=subwidth, alignment=alignment, padding=padding) retval += string while len(retval) > width: retval = retval.replace(' ', ' ', 1) @@ -150,13 +148,7 @@ def justify_string_by_chunk(string: str, width: int = 80, padding: str = " ") -> padding = padding[0] first, *rest, last = string.split() w = width - (len(first) + 1 + len(last) + 1) - ret = ( - first - + padding - + distribute_strings(rest, width=w, padding=padding) - + padding - + last - ) + ret = first + padding + distribute_strings(rest, width=w, padding=padding) + padding + last return ret -- cgit v1.3