MCPcopy
hub / github.com/pallets/click / _split_opt

Function _split_opt

src/click/parser.py:111–117  ·  view source on GitHub ↗
(opt: str)

Source from the content-addressed store, hash-verified

109
110
111def _split_opt(opt: str) -> tuple[str, str]:
112 first = opt[:1]
113 if first.isalnum():
114 return "", opt
115 if opt[1:2] == first:
116 return opt[:2], opt[2:]
117 return first, opt[1:]
118
119
120def _normalize_opt(opt: str, ctx: Context | None) -> str:

Callers 6

resolve_commandMethod · 0.85
_parse_declsMethod · 0.85
get_help_extraMethod · 0.85
_normalize_optFunction · 0.85
__init__Method · 0.85
join_optionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected