mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Merge pull request #3322 from volundmush/fix_base_option
Fixing output of BaseOption.display to always be str
This commit is contained in:
commit
dcc8546ce7
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue