From 486b8c726a7d657ef320e68598077c31fa664790 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Fri, 19 Feb 2021 21:40:15 -0500 Subject: Fixed black, isort, flake8, and doc8 issues --- cmd2/utils.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'cmd2/utils.py') diff --git a/cmd2/utils.py b/cmd2/utils.py index 8dad5f4c..9920ad64 100644 --- a/cmd2/utils.py +++ b/cmd2/utils.py @@ -93,11 +93,18 @@ def str_to_bool(val: str) -> bool: class Settable: """Used to configure a cmd2 instance member to be settable via the set command in the CLI""" - def __init__(self, name: str, val_type: Callable, description: str, *, - onchange_cb: Callable[[str, Any, Any], Any] = None, - choices: Iterable = None, - choices_provider: Optional[Callable] = None, - completer: Optional[Callable] = None): + + def __init__( + self, + name: str, + val_type: Callable, + description: str, + *, + onchange_cb: Callable[[str, Any, Any], Any] = None, + choices: Iterable = None, + choices_provider: Optional[Callable] = None, + completer: Optional[Callable] = None + ): """ Settable Initializer @@ -1075,6 +1082,7 @@ def get_defining_class(meth) -> Type: class CompletionMode(Enum): """Enum for what type of tab completion to perform in cmd2.Cmd.read_input()""" + # Tab completion will be disabled during read_input() call # Use of custom up-arrow history supported NONE = 1 @@ -1092,6 +1100,7 @@ class CompletionMode(Enum): class CustomCompletionSettings: """Used by cmd2.Cmd.complete() to tab complete strings other than command arguments""" + def __init__(self, parser: argparse.ArgumentParser, *, preserve_quotes: bool = False): """ Initializer -- cgit v1.2.1