Skip to content

Commit 0af21f7

Browse files
committed
remove unneeded comments
1 parent d640d64 commit 0af21f7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymc_marketing/mmm/builders/factories.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)