v4.8.0
Features
Lazy Loading --help improvements.
Previously, running --help on a parent command would import and resolve all lazy child commands, negating much of the startup-time benefits. Now, parent --help displays lazy commands without triggering any imports.
To show descriptions for lazy commands in --help output, provide help= at registration time:
app.command("myapp.commands:deploy", help="Deploy the application.")Other metadata (group=, show=, sort_key=) can also be provided at registration time and will be used for help display without resolving the command.
Lazy commands are now only resolved when:
- The specific command is executed
- The specific command's own
--helpis requested (e.g.,myapp deploy --help) - The command is accessed directly via
app["command_name"]
Thanks to @zzstoatzz for the initial contribution in #757.
Full Changelog: v4.7.0...v4.8.0