summaryrefslogtreecommitdiff
path: root/cmd2/argparse_completer.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-26 17:06:32 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-26 17:06:32 -0400
commitc96648038289017531f68eeb7dcfddfe9ea85735 (patch)
tree11574a2f624de5aab493460239aa0542341b37ce /cmd2/argparse_completer.py
parent9f07daaff4763989c89ab51f64e190dc5ba825fe (diff)
downloadcmd2-git-c96648038289017531f68eeb7dcfddfe9ea85735.tar.gz
Changed default styles to use a more flexible approach which could be used to call any function to add style
Diffstat (limited to 'cmd2/argparse_completer.py')
-rw-r--r--cmd2/argparse_completer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py
index fd0eb0ec..72973bec 100644
--- a/cmd2/argparse_completer.py
+++ b/cmd2/argparse_completer.py
@@ -66,7 +66,7 @@ import sys
from argparse import ZERO_OR_MORE, ONE_OR_MORE, ArgumentError, _, _get_action_name, SUPPRESS
from typing import List, Dict, Tuple, Callable, Union
-from .ansi import ansi_safe_wcswidth, style, ErrorStyle
+from .ansi import ansi_safe_wcswidth, style_error
from .rl_utils import rl_force_redisplay
# attribute that can optionally added to an argparse argument (called an Action) to
@@ -994,7 +994,7 @@ class ACArgumentParser(argparse.ArgumentParser):
linum += 1
self.print_usage(sys.stderr)
- formatted_message = style(formatted_message, ErrorStyle)
+ formatted_message = style_error(formatted_message)
self.exit(2, '{}\n\n'.format(formatted_message))
def format_help(self) -> str: