diff --git a/blueprintcompiler/language/adw_breakpoint.py b/blueprintcompiler/language/adw_breakpoint.py index 3d2c10d..4ad5b24 100644 --- a/blueprintcompiler/language/adw_breakpoint.py +++ b/blueprintcompiler/language/adw_breakpoint.py @@ -81,8 +81,8 @@ class AdwBreakpointSetter(AstNode): return self.tokens["property"] @property - def value(self) -> T.Optional[Value]: - return self.children[Value][0] if len(self.children[Value]) > 0 else None + def value(self) -> Value: + return self.children[Value][0] @property def gir_class(self) -> T.Optional[GirType]: @@ -106,10 +106,7 @@ class AdwBreakpointSetter(AstNode): return None @property - def document_symbol(self) -> T.Optional[DocumentSymbol]: - if self.value is None: - return None - + def document_symbol(self) -> DocumentSymbol: return DocumentSymbol( f"{self.object_id}.{self.property_name}", SymbolKind.Property, diff --git a/blueprintcompiler/outputs/xml/__init__.py b/blueprintcompiler/outputs/xml/__init__.py index 15850f7..5c03761 100644 --- a/blueprintcompiler/outputs/xml/__init__.py +++ b/blueprintcompiler/outputs/xml/__init__.py @@ -308,9 +308,6 @@ class XmlOutput(OutputFormat): elif isinstance(extension, AdwBreakpointSetters): for setter in extension.setters: - if setter.value is None: - continue - attrs = {} if isinstance(setter.value.child, Translated):