From fe91e3781660d12e859f446e351ab4e11e876935 Mon Sep 17 00:00:00 2001 From: Sean Vig Date: Mon, 19 Dec 2022 22:35:20 -0500 Subject: [PATCH] Handle enum value named 'async' --- pywayland/scanner/entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywayland/scanner/entry.py b/pywayland/scanner/entry.py index 0248880..b5aaee1 100644 --- a/pywayland/scanner/entry.py +++ b/pywayland/scanner/entry.py @@ -62,8 +62,8 @@ def output(self, enum_name: str, printer: Printer) -> None: int(self.name) printer("{}_{} = {}".format(enum_name, self.name, value)) except ValueError: - if self.name == "name": - name = "name_" + if self.name in ("name", "async"): + name = self.name + "_" else: name = self.name printer("{} = {}".format(name, value))