Skip to content

Commit c4dad2f

Browse files
committed
Rename CommandMode to Verbosity.
1 parent d10b36b commit c4dad2f

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

litecli/packages/special/llm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
MODELS = {}
2626

2727
from . import export
28-
from .main import parse_special_command, CommandMode
28+
from .main import parse_special_command, Verbosity
2929

3030
log = logging.getLogger(__name__)
3131

@@ -220,8 +220,8 @@ def handle_llm(text, cur) -> Tuple[str, Optional[str], float]:
220220
"""
221221
# Determine invocation mode: regular, verbose (+), or succinct (-)
222222
_, mode, arg = parse_special_command(text)
223-
is_verbose = mode is CommandMode.VERBOSE
224-
is_succinct = mode is CommandMode.SUCCINCT
223+
is_verbose = mode is Verbosity.VERBOSE
224+
is_succinct = mode is Verbosity.SUCCINCT
225225

226226
# LLM is not installed.
227227
if llm is None:

litecli/packages/special/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CommandNotFound(Exception):
3737
pass
3838

3939

40-
class CommandMode(Enum):
40+
class Verbosity(Enum):
4141
"""Mode for special command invocation: regular, verbose (+), or succinct (-)."""
4242

4343
REGULAR = "regular"
@@ -57,11 +57,11 @@ def parse_special_command(sql):
5757
# strip out any + or - modifiers to get the actual command name
5858
command = raw.strip().rstrip("+-")
5959
if is_verbose:
60-
mode = CommandMode.VERBOSE
60+
mode = Verbosity.VERBOSE
6161
elif is_succinct:
62-
mode = CommandMode.SUCCINCT
62+
mode = Verbosity.SUCCINCT
6363
else:
64-
mode = CommandMode.REGULAR
64+
mode = Verbosity.REGULAR
6565
return (command, mode, arg.strip())
6666

6767

@@ -137,7 +137,7 @@ def execute(cur, sql):
137137
if special_cmd.arg_type == NO_QUERY:
138138
return special_cmd.handler()
139139
elif special_cmd.arg_type == PARSED_QUERY:
140-
return special_cmd.handler(cur=cur, arg=arg, verbose=(mode is CommandMode.VERBOSE))
140+
return special_cmd.handler(cur=cur, arg=arg, verbose=(mode is Verbosity.VERBOSE))
141141
elif special_cmd.arg_type == RAW_QUERY:
142142
return special_cmd.handler(cur=cur, query=sql)
143143

0 commit comments

Comments
 (0)