Skip to content

Commit f1803b3

Browse files
committed
Improve a couple type hints to be more specific than Any
1 parent 075d153 commit f1803b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd2/cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,10 +3291,10 @@ def read_input(
32913291
completer_to_use = Cmd2Completer(self, custom_settings=custom_settings)
32923292

32933293
# Use dynamic prompt if the prompt matches self.prompt
3294-
def get_prompt() -> Any:
3294+
def get_prompt() -> ANSI | str:
32953295
return ANSI(self.prompt)
32963296

3297-
prompt_to_use: Any = ANSI(prompt)
3297+
prompt_to_use: Callable[[], ANSI | str] | ANSI | str = ANSI(prompt)
32983298
if prompt == self.prompt:
32993299
prompt_to_use = get_prompt
33003300

0 commit comments

Comments
 (0)