From 8ac1cbfd6a05e3775a6b62a8a116251a3afc6100 Mon Sep 17 00:00:00 2001 From: alemidev Date: Mon, 29 Nov 2021 14:17:11 +0100 Subject: [PATCH] fix for slots --- compiler/proto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/proto.py b/compiler/proto.py index 73341e7..752bf35 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -105,7 +105,7 @@ class PacketClassWriter: name=self.title, ids='{\n\t\t' + ',\n\t\t'.join(self.ids) + '\n\t}\n', definitions='{\n\t\t' + '\n\t\t'.join(self.slots) + '\n\t}\n', - slots=', '.join(f"'{x}'" for x in (list(self.attrs) + ["id"])), # TODO de-jank! + slots=', '.join((f"'is_{x}'" if keyword.iskeyword(x) else f"'{x}'") for x in (list(self.attrs) + ["id"])), # TODO de-jank! fields='\n\t'.join(self.fields), state=self.state, )