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

Method format_usage

src/click/core.py:1124–1130  ·  view source on GitHub ↗

Writes the usage line into the formatter. This is a low-level method called by :meth:`get_usage`.

(self, ctx: Context, formatter: HelpFormatter)

Source from the content-addressed store, hash-verified

1122 return params
1123
1124 def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None:
1125 """Writes the usage line into the formatter.
1126
1127 This is a low-level method called by :meth:`get_usage`.
1128 """
1129 pieces = self.collect_usage_pieces(ctx)
1130 formatter.write_usage(ctx.command_path, " ".join(pieces))
1131
1132 def collect_usage_pieces(self, ctx: Context) -> list[str]:
1133 """Returns all the pieces that go into the usage line and returns

Callers 2

get_usageMethod · 0.95
format_helpMethod · 0.95

Calls 2

collect_usage_piecesMethod · 0.95
write_usageMethod · 0.80

Tested by

no test coverage detected