File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def __call__(self) -> mmm_pb.Mmm:
125125
126126 copy_specs = []
127127 for spec in self ._input_specs :
128- if not any ( isinstance (spec , t ) for t in _ALLOWED_SPEC_TYPES_FOR_UI ):
128+ if not isinstance (spec , tuple ( _ALLOWED_SPEC_TYPES_FOR_UI ) ):
129129 raise ValueError (f"Unsupported spec type: { spec .__class__ .__name__ } " )
130130
131131 if isinstance (spec , bop .BudgetOptimizationSpec ):
@@ -153,11 +153,7 @@ def __call__(self) -> mmm_pb.Mmm:
153153
154154 sub_specs = []
155155 for spec in copy_specs :
156- to_create_subspecs = self ._time_breakdown_generators and any (
157- isinstance (spec , t ) for t in _SPEC_TYPES_CREATE_SUBSPECS
158- )
159-
160- if to_create_subspecs :
156+ if isinstance (spec , tuple (_SPEC_TYPES_CREATE_SUBSPECS )):
161157 dates = self ._enumerate_dates_open_end (spec )
162158 sub_specs .extend (
163159 _create_subspecs (spec , dates , self ._time_breakdown_generators )
You can’t perform that action at this time.
0 commit comments