summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-03-02 15:44:00 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-03-02 15:44:00 -0500
commit5bca14f66c7e319e05b0ef641eb159df80177d3b (patch)
tree62b92390dad37a9d136c0c7a041a84588d242b39
parentcb07ba98d3d89de3e85f09912eb8b99963c5adb2 (diff)
downloadcmd2-git-5bca14f66c7e319e05b0ef641eb159df80177d3b.tar.gz
Made changes requested in code review
-rw-r--r--cmd2/ansi.py2
-rw-r--r--cmd2/argparse_completer.py2
2 files changed, 2 insertions, 2 deletions
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: