Fix enums with "-"/"_" in the name

This commit is contained in:
James Westman 2021-11-24 14:57:34 -06:00
parent f2b7d3bd95
commit c4beb6841c
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
5 changed files with 21 additions and 1 deletions

View file

@ -291,6 +291,10 @@ class EnumMember(GirNode):
def value(self):
return self._value
@property
def nick(self):
return self.xml["glib:nick"]
@property
def signature(self):
return f"enum member {self.full_name} = {self.value}"