Sample implemention of JSONtoTextParser

This commit is contained in:
Fabian Dill
2021-01-31 11:33:39 +01:00
parent 3d81f0cca7
commit 1da1e4eac6
3 changed files with 57 additions and 40 deletions

View File

@@ -592,8 +592,8 @@ class CommandMeta(type):
commands = attrs["commands"] = {}
for base in bases:
commands.update(base.commands)
commands.update({name[5:].lower(): method for name, method in attrs.items() if
name.startswith("_cmd_")})
commands.update({command_name[5:]: method for command_name, method in attrs.items() if
command_name.startswith("_cmd_")})
return super(CommandMeta, cls).__new__(cls, name, bases, attrs)