Merge pull request #441 from Ken-g6/main

Allow SomethingToString to accept a string
This commit is contained in:
Jukka Seppänen 2025-11-22 17:40:01 +02:00 committed by GitHub
commit a69d7c1a95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -669,7 +669,7 @@ Converts any type to a string.
""" """
def stringify(self, input, prefix="", suffix=""): def stringify(self, input, prefix="", suffix=""):
if isinstance(input, (int, float, bool)): if isinstance(input, (int, float, bool, str)):
stringified = str(input) stringified = str(input)
elif isinstance(input, list): elif isinstance(input, list):
stringified = ', '.join(str(item) for item in input) stringified = ', '.join(str(item) for item in input)