mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
fix formatting and some tests
This commit is contained in:
parent
c708532a8d
commit
ab9d902cc5
4 changed files with 8 additions and 7 deletions
|
@ -29,6 +29,7 @@ from .types import TypeName
|
|||
from .variant import VarContent
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("GLib", "2.0")
|
||||
from gi.repository import GLib
|
||||
|
||||
|
@ -377,7 +378,6 @@ class IdentLiteral(AstNode):
|
|||
return None
|
||||
|
||||
|
||||
|
||||
class VariantValue(AstNode):
|
||||
grammar = [
|
||||
"variant",
|
||||
|
@ -424,7 +424,7 @@ class VariantValue(AstNode):
|
|||
def validate_type(self):
|
||||
if not GLib.VariantType.string_is_valid(self.var_type):
|
||||
raise CompileError(f"`{self.var_type}` is not a valid variant type")
|
||||
|
||||
|
||||
@validate()
|
||||
def validate_content(self):
|
||||
if not GLib.VariantType.string_is_valid(self.var_type):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue