MCPcopy Index your code
hub / github.com/pyinvoke/invoke / to_flag

Function to_flag

invoke/parser/context.py:16–20  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

14
15
16def to_flag(name: str) -> str:
17 name = translate_underscores(name)
18 if len(name) == 1:
19 return "-" + name
20 return "--" + name
21
22
23def sort_candidate(arg: Argument) -> str:

Callers 3

add_argMethod · 0.85
help_tuplesMethod · 0.85
flag_namesMethod · 0.85

Calls 1

translate_underscoresFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…