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

Method get_default_prog_name

src/click/testing.py:382–387  ·  view source on GitHub ↗

Given a command object it will return the default program name for it. The default is the `name` attribute or ``"root"`` if not set.

(self, cli: Command)

Source from the content-addressed store, hash-verified

380 self.capture = capture
381
382 def get_default_prog_name(self, cli: Command) -> str:
383 """Given a command object it will return the default program name
384 for it. The default is the `name` attribute or ``"root"`` if not
385 set.
386 """
387 return cli.name or "root"
388
389 def make_env(
390 self, overrides: cabc.Mapping[str, str | None] | None = None

Callers 1

invokeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected