File tree Expand file tree Collapse file tree
puan/modules/configurator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,43 +283,6 @@ def add(self, proposition: pg.AtLeast) -> "StingyConfigurator":
283283 * (self .propositions + [proposition ]),
284284 id = self .id ,
285285 )
286-
287- def assume (self , fixed : typing .Dict [str , int ]) -> tuple :
288-
289- """
290- Assumes variables in `fixed`-list. Passes prio onwards as well.
291-
292- Returns
293- -------
294- out : tuple(StingyConfigurator, dict)
295- """
296- # Prepare to put pack prio's
297- self_flatten = self .flatten ()
298- d_flatten = dict (
299- zip (
300- map (
301- operator .attrgetter ("id" ),
302- self_flatten ,
303- ),
304- self_flatten ,
305- ),
306- )
307-
308- assumed_sub , variable_consequence = pg .AtLeast (
309- * self .propositions ,
310- value = len (self .propositions ),
311- id = self ._id ,
312- ).assume (fixed )
313-
314- # Put back prio into proposition with prio set
315- for proposition in filter (lambda x : isinstance (x , pg .Any ), assumed_sub .flatten ()):
316- proposition .__class__ = Any
317- proposition .prio = getattr (d_flatten .get (proposition .id , {}), "prio" , - 1 )
318-
319- return StingyConfigurator (
320- * assumed_sub .propositions ,
321- id = self ._id ,
322- ), variable_consequence
323286
324287 def from_json (data : dict ) -> "StingyConfigurator" :
325288
You can’t perform that action at this time.
0 commit comments