File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
pymc_marketing/mmm/builders Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ def build(spec: Mapping[str, Any]) -> Any:
9393 * kwargs : dict (optional)
9494 * args : list (optional positional arguments)
9595 """
96- # Ensure class is a string
9796 if not isinstance (spec ["class" ], str ):
9897 raise TypeError (
9998 f"Expected string for 'class' but got { type (spec ['class' ]).__name__ } : { spec ['class' ]} "
@@ -153,15 +152,15 @@ def resolve(value):
153152
154153 This is a helper function for build.
155154 """
156- # nested object
157155 if isinstance (value , Mapping ) and "class" in value :
158156 return build (value )
159- # list of nested objects
157+
160158 if (
161159 isinstance (value , list )
162160 and value
163161 and isinstance (value [0 ], Mapping )
164162 and "class" in value [0 ]
165163 ):
166164 return [build (v ) for v in value ]
165+
167166 return value
You can’t perform that action at this time.
0 commit comments