ConfigurableParameter.get_typical_input_len: limit to 10 lines

Calling applications can use get_typical_input_len() to decide for the
size of an input field. For very long input, a text input field
typically scrolls. So set an upper limit for get_typical_input_len().

Change-Id: Ia3d79e786f397a02bf2a8fafac5030d1198d9f76
Jenkins: skip-card-test
This commit is contained in:
Neels Hofmeyr
2026-04-28 05:14:17 +02:00
parent e36256fad7
commit a6fbc812a3
+3 -1
View File
@@ -297,7 +297,9 @@ class ConfigurableParameter(abc.ABC, metaclass=ClassVarMeta):
May be overridden by subclasses.
This default implementation returns the maximum allowed value length -- a good fit for most subclasses.
'''
return cls.get_len_range()[1] or 16
l = cls.get_len_range()[1] or 16
l = min(10*80, l)
return l
@classmethod
def is_super_of(cls, other_class):