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

Method get_usage

src/click/core.py:1090–1097  ·  view source on GitHub ↗

Formats the usage line into a string and returns it. Calls :meth:`format_usage` internally.

(self, ctx: Context)

Source from the content-addressed store, hash-verified

1088 return f"<{self.__class__.__name__} {self.name}>"
1089
1090 def get_usage(self, ctx: Context) -> str:
1091 """Formats the usage line into a string and returns it.
1092
1093 Calls :meth:`format_usage` internally.
1094 """
1095 formatter = ctx.make_formatter()
1096 self.format_usage(ctx, formatter)
1097 return formatter.getvalue().rstrip("\n")
1098
1099 def get_params(self, ctx: Context) -> list[Parameter]:
1100 params = self.params

Callers

nothing calls this directly

Calls 3

format_usageMethod · 0.95
make_formatterMethod · 0.80
getvalueMethod · 0.80

Tested by

no test coverage detected