mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
Add tests, remove unused code, fix bugs
- Added tests for more error messages - Test the "go to reference" feature at every character index of every test case - Delete unused code and imports - Fix some bugs I found along the way
This commit is contained in:
parent
5b0f662478
commit
9b9fab832b
47 changed files with 140 additions and 190 deletions
|
@ -50,7 +50,7 @@ class ExtListItemFactory(AstNode):
|
|||
else:
|
||||
return self.root.gir.get_type("ListItem", "Gtk")
|
||||
|
||||
@validate("template")
|
||||
@validate("id")
|
||||
def container_is_builder_list(self):
|
||||
validate_parent_type(
|
||||
self,
|
||||
|
@ -59,7 +59,7 @@ class ExtListItemFactory(AstNode):
|
|||
"sub-templates",
|
||||
)
|
||||
|
||||
@validate("template")
|
||||
@validate("id")
|
||||
def unique_in_parent(self):
|
||||
self.validate_unique_in_parent("Duplicate template block")
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ExtListItemFactory(AstNode):
|
|||
f"Only Gtk.ListItem, Gtk.ListHeader, Gtk.ColumnViewRow, or Gtk.ColumnViewCell is allowed as a type here"
|
||||
)
|
||||
|
||||
@validate("template")
|
||||
@validate("id")
|
||||
def type_name_upgrade(self):
|
||||
if self.type_name is None:
|
||||
raise UpgradeWarning(
|
||||
|
@ -103,10 +103,7 @@ class ExtListItemFactory(AstNode):
|
|||
|
||||
@property
|
||||
def action_widgets(self):
|
||||
"""
|
||||
The sub-template shouldn't have it`s own actions this is
|
||||
just hear to satisfy XmlOutput._emit_object_or_template
|
||||
"""
|
||||
# The sub-template shouldn't have its own actions, this is just here to satisfy XmlOutput._emit_object_or_template
|
||||
return None
|
||||
|
||||
@docs("id")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue