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

Function _normalize_opt

src/click/parser.py:120–124  ·  view source on GitHub ↗
(opt: str, ctx: Context | None)

Source from the content-addressed store, hash-verified

118
119
120def _normalize_opt(opt: str, ctx: Context | None) -> str:
121 if ctx is None or ctx.token_normalize_func is None:
122 return opt
123 prefix, opt = _split_opt(opt)
124 return f"{prefix}{ctx.token_normalize_func(opt)}"
125
126
127class _Option:

Callers 3

add_optionMethod · 0.85
_match_short_optMethod · 0.85
_process_optsMethod · 0.85

Calls 1

_split_optFunction · 0.85

Tested by

no test coverage detected