Fixing output of BaseOption.display to always be str
This commit is contained in:
parent
f6b43b0416
commit
fb28ee54a5
1 changed files with 2 additions and 2 deletions
|
|
@ -170,7 +170,7 @@ class BaseOption:
|
||||||
"""
|
"""
|
||||||
return validatorfuncs.text(value, option_key=self.key, **kwargs)
|
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.
|
Renders the Option's value as something pretty to look at.
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ class BaseOption:
|
||||||
timedelta is pretty ugly).
|
timedelta is pretty ugly).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return self.value
|
return self.value if isinstance(self.value, str) else str(self.value)
|
||||||
|
|
||||||
|
|
||||||
# Option classes
|
# Option classes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue