validation: Disallow instantiating abstract classes

This commit is contained in:
James Westman 2022-04-28 23:07:32 -05:00
parent f78478bea1
commit 99e428d93c
17 changed files with 35 additions and 13 deletions

View file

@ -33,6 +33,10 @@ class Template(Object):
ObjectContent,
]
@validate()
def not_abstract(self):
pass # does not apply to templates
def emit_xml(self, xml: XmlEmitter):
if self.gir_class:
parent = self.gir_class.glib_type_name