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

Method format_help

src/click/core.py:1210–1225  ·  view source on GitHub ↗

Writes the help into the formatter if it exists. This is a low-level method called by :meth:`get_help`. This calls the following methods: - :meth:`format_usage` - :meth:`format_help_text` - :meth:`format_options` - :meth:`format_epilog`

(self, ctx: Context, formatter: HelpFormatter)

Source from the content-addressed store, hash-verified

1208 return text.strip()
1209
1210 def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
1211 """Writes the help into the formatter if it exists.
1212
1213 This is a low-level method called by :meth:`get_help`.
1214
1215 This calls the following methods:
1216
1217 - :meth:`format_usage`
1218 - :meth:`format_help_text`
1219 - :meth:`format_options`
1220 - :meth:`format_epilog`
1221 """
1222 self.format_usage(ctx, formatter)
1223 self.format_help_text(ctx, formatter)
1224 self.format_options(ctx, formatter)
1225 self.format_epilog(ctx, formatter)
1226
1227 def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None:
1228 """Writes the help text to the formatter if it exists."""

Callers 2

get_helpMethod · 0.95
get_helpMethod · 0.80

Calls 4

format_usageMethod · 0.95
format_help_textMethod · 0.95
format_optionsMethod · 0.95
format_epilogMethod · 0.95

Tested by 1

get_helpMethod · 0.64