@@ -81,18 +81,16 @@ def check_value(self, value, path, property_name, **kwargs):
81
81
82
82
return matches
83
83
84
- def check (self , cfn , properties , value_specs , property_specs , path ):
84
+ def check (self , cfn , properties , property_specs , path ):
85
85
"""Check itself"""
86
86
matches = []
87
87
for p_value , p_path in properties .items_safe (path [:]):
88
88
for prop in p_value :
89
- if prop in value_specs :
90
- value = value_specs .get (prop ).get ("Value" , {})
89
+ if prop in property_specs :
90
+ value = property_specs .get (prop ).get ("Value" , {})
91
91
if value :
92
92
value_type = value .get ("ValueType" , "" )
93
- property_type = (
94
- property_specs .get ("Properties" ).get (prop ).get ("Type" )
95
- )
93
+ property_type = property_specs .get (prop ).get ("Type" )
96
94
value_specs = (
97
95
RESOURCE_SPECS .get (cfn .regions [0 ])
98
96
.get ("ValueTypes" )
@@ -128,10 +126,7 @@ def match_resource_sub_properties(self, properties, property_type, path, cfn):
128
126
.get (property_type , {})
129
127
.get ("Properties" , {})
130
128
)
131
- property_specs = (
132
- RESOURCE_SPECS .get (cfn .regions [0 ]).get ("PropertyTypes" ).get (property_type )
133
- )
134
- matches .extend (self .check (cfn , properties , specs , property_specs , path ))
129
+ matches .extend (self .check (cfn , properties , specs , path ))
135
130
136
131
return matches
137
132
@@ -145,9 +140,6 @@ def match_resource_properties(self, properties, resource_type, path, cfn):
145
140
.get (resource_type , {})
146
141
.get ("Properties" , {})
147
142
)
148
- resource_specs = (
149
- RESOURCE_SPECS .get (cfn .regions [0 ]).get ("ResourceTypes" ).get (resource_type )
150
- )
151
- matches .extend (self .check (cfn , properties , specs , resource_specs , path ))
143
+ matches .extend (self .check (cfn , properties , specs , path ))
152
144
153
145
return matches
0 commit comments