From 5bca14f66c7e319e05b0ef641eb159df80177d3b Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Tue, 2 Mar 2021 15:44:00 -0500 Subject: Made changes requested in code review --- cmd2/ansi.py | 2 +- cmd2/argparse_completer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd2') diff --git a/cmd2/ansi.py b/cmd2/ansi.py index d0159629..0f34016d 100644 --- a/cmd2/ansi.py +++ b/cmd2/ansi.py @@ -184,7 +184,7 @@ def strip_style(text: str) -> str: def style_aware_wcswidth(text: str) -> int: """ - Wrap wcswidth to make it compatible with strings that contains ANSI style sequences. + Wrap wcswidth to make it compatible with strings that contain ANSI style sequences. This is intended for single line strings. If text contains a newline, this function will return -1. For multiline strings, call widest_line() instead. diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py index a40a9e2e..21007289 100644 --- a/cmd2/argparse_completer.py +++ b/cmd2/argparse_completer.py @@ -526,7 +526,7 @@ class ArgparseCompleter: def _format_completions(self, arg_state: _ArgumentState, completions: List[Union[str, CompletionItem]]) -> List[str]: # Check if the results are CompletionItems and that there aren't too many to display if 1 < len(completions) <= self._cmd2_app.max_completion_items and isinstance(completions[0], CompletionItem): - four_spaces = ' ' + four_spaces = 4 * ' ' # If the user has not already sorted the CompletionItems, then sort them before appending the descriptions if not self._cmd2_app.matches_sorted: -- cgit v1.2.1