Skip to content

Commit

Permalink
Handle enum value named 'async'
Browse files Browse the repository at this point in the history
  • Loading branch information
flacjacket committed Dec 20, 2022
1 parent 7e6353f commit fe91e37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pywayland/scanner/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit fe91e37

Please sign in to comment.