Support dynamic default values
Typer allows passing a default_factory to options and arguments, which is a callable that will be used at runtime to determine the default value. Typer sets the option's default on the Click command object to the supplied factory value.
The Textual application created by Trogon crashes when this is used, because it tries to convert the str representation of the callable function for display when it should be converting the result of calling that function instead.
I don't think I fully understand why this crash occurs, since it appears that Trogon properly handles a default Click application when an option's default is e.g. a lambda. Perhaps Typer is missing something in its translation of default_factory to Click's default, and I'm open to filing an issue/opening a PR on their end if it appears that's the case, but I'd need help in better understanding it!
@daneah Any plans to merge this? Progress has staled on trogon.
@gaby even if I merge this (I can't without a review from another maintainer), I don't have release privileges unfortunately. I think that other folks with those privileges have other life things going on.
@daneah Ohhh, that explains it. Thanks for the info. Do you know who we can ping about that?
@gaby The list of org people is where to for this kind of thing, typically.
Ping @darrenburns anyone in textual that can help with maintenance of trogon?