Add 'plot' function and remove deprecated 'percent' type

This commit is contained in:
Bartłomiej Pluta
2019-07-30 13:59:18 +02:00
parent 8abae7c2ff
commit 7e55fe4c1a
5 changed files with 145 additions and 8 deletions

View File

@@ -12,7 +12,6 @@ class Type(Enum):
STRING = (str, lambda x: x)
LIST = (list, lambda x: f"[{', '.join([e.stringify() for e in x])}]")
MAP = (dict, lambda x: '{' + ', '.join(f"'{k.stringify()}' -> '{v.stringify()}'" for k, v in x.items()) + '}')
PERCENT = (float, lambda x: f"{int(x * 100)}%")
NOTE = (Note, lambda x: x.note.name)
BOOL = (bool, lambda x: str(x).lower())
SOUND = (Sound, lambda x: x.file)