Fixing output of BaseOption.display to always be str

This commit is contained in:
Andrew Bastien 2023-11-04 16:42:39 -04:00
parent f6b43b0416
commit fb28ee54a5

View file

@ -170,7 +170,7 @@ class BaseOption:
"""
return validatorfuncs.text(value, option_key=self.key, **kwargs)
def display(self, **kwargs):
def display(self, **kwargs) -> str:
"""
Renders the Option's value as something pretty to look at.
@ -183,7 +183,7 @@ class BaseOption:
timedelta is pretty ugly).
"""
return self.value
return self.value if isinstance(self.value, str) else str(self.value)
# Option classes