This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 6ad08a0 Add a note about keeping Widget.SELECT as the form choice
default
6ad08a0 is described below
commit 6ad08a08a5dba233f68b865ee05e9445e2f98d75
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Dec 29 14:44:20 2025 +0000
Add a note about keeping Widget.SELECT as the form choice default
---
atr/form.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/atr/form.py b/atr/form.py
index e4e8ae4..3fdcf58 100644
--- a/atr/form.py
+++ b/atr/form.py
@@ -721,6 +721,9 @@ def _get_widget_type(field_info: pydantic.fields.FieldInfo)
-> Widget: # noqa:
args = get_args(annotation)
if len(args) == 1:
return Widget.TEXT
+ # The other reasonable option as the default here is Widget.RADIO
+ # But currently in ATR we use RADIO 7 times and SELECT 6 times
+ # This is close enough to warrant keeping SELECT as the default
return Widget.SELECT
if origin is set:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]