Commit 981c48d
committed
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. 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. This change ensures dynamic default values do not
crash the application, and has the effect of setting the default value
appropriately in the TUI.1 parent eaa9e68 commit 981c48d
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
0 commit comments