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

Method flag_names

invoke/parser/context.py:253–266  ·  view source on GitHub ↗

Similar to `help_tuples` but returns flag names only, no helpstrs. Specifically, all flag names, flattened, in rough order. .. versionadded:: 1.0

(self)

Source from the content-addressed store, hash-verified

251 )
252
253 def flag_names(self) -> Tuple[str, ...]:
254 """
255 Similar to `help_tuples` but returns flag names only, no helpstrs.
256
257 Specifically, all flag names, flattened, in rough order.
258
259 .. versionadded:: 1.0
260 """
261 # Regular flag names
262 flags = sorted(self.flags.values(), key=flag_key)
263 names = [self.names_for(to_flag(x.name)) for x in flags]
264 # Inverse flag names sold separately
265 names.append(list(self.inverse_flags.keys()))
266 return tuple(itertools.chain.from_iterable(names))

Callers 1

completeFunction · 0.80

Calls 2

names_forMethod · 0.95
to_flagFunction · 0.85

Tested by

no test coverage detected