From ca6ada8b83435adf9d94911c32c5b21416525e05 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 2 Jan 2017 19:43:15 -0800 Subject: [PATCH] Make spec links mandatory --- components/style/properties/data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/style/properties/data.py b/components/style/properties/data.py index 6fe7a16257c..9ee8c08cf18 100644 --- a/components/style/properties/data.py +++ b/components/style/properties/data.py @@ -84,12 +84,14 @@ def arg_to_bool(arg): class Longhand(object): - def __init__(self, style_struct, name, spec="NO SPEC", animatable=None, derived_from=None, keyword=None, + def __init__(self, style_struct, name, spec=None, animatable=None, derived_from=None, keyword=None, predefined_type=None, custom_cascade=False, experimental=False, internal=False, need_clone=False, need_index=False, gecko_ffi_name=None, depend_on_viewport_size=False, allowed_in_keyframe_block=True, complex_color=False, cast_type='u8', has_uncacheable_values=False, logical=False): self.name = name + if not spec: + raise TypeError("Spec should be specified for %s" % name) self.spec = spec self.keyword = keyword self.predefined_type = predefined_type @@ -131,9 +133,11 @@ class Longhand(object): class Shorthand(object): - def __init__(self, name, sub_properties, spec="NO SPEC", experimental=False, internal=False, + def __init__(self, name, sub_properties, spec=None, experimental=False, internal=False, allowed_in_keyframe_block=True): self.name = name + if not spec: + raise TypeError("Spec should be specified for %s" % name) self.spec = spec self.ident = to_rust_ident(name) self.camel_case = to_camel_case(self.ident)