MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / _single_prefix_char

Function _single_prefix_char

cmd2/argparse_completer.py:67–69  ·  view source on GitHub ↗

Is a token just a single flag prefix character.

(token: str, parser: Cmd2ArgumentParser)

Source from the content-addressed store, hash-verified

65
66
67def _single_prefix_char(token: str, parser: Cmd2ArgumentParser) -> bool:
68 """Is a token just a single flag prefix character."""
69 return len(token) == 1 and token[0] in parser.prefix_chars
70
71
72def _looks_like_flag(token: str, parser: Cmd2ArgumentParser) -> bool:

Callers 2

test_single_prefix_charFunction · 0.90
_handle_last_tokenMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_single_prefix_charFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…