From 4d3a470e58375ac40be39fdadf0b27f07d2ac1b7 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 12 Sep 2018 16:45:20 +0200 Subject: [PATCH] pass storage when copy/deepcopy a config --- tiramisu/api.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index 355111c..7caba99 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -16,7 +16,6 @@ # ____________________________________________________________ from inspect import ismethod, getdoc, signature from time import time -from copy import deepcopy from typing import List, Any, Optional, Callable, Union, Dict @@ -979,12 +978,16 @@ class TiramisuContextConfig(TiramisuContext): return self.config_bag.context.impl_getname() def _c_copy(self, - session_id=None): - return Config(self.config_bag.context.duplicate(session_id)) + session_id=None, + storage=None): + return Config(self.config_bag.context.duplicate(session_id, + storage=storage)) def _c_deepcopy(self, - session_id=None): + session_id=None, + storage=None): return Config(self.config_bag.context.duplicate(session_id, + storage=storage, deep=True)) def _c_meta(self): @@ -1146,7 +1149,7 @@ class GroupConfig(TiramisuAPI): super().__init__(config) -def getapi(config: Config): +def getapi(config: Config): # pragma: no cover """instanciate Config :param config: KernelConfig object