| Conditions | 4 | 
| Total Lines | 15 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 4 | 
| Changes | 0 | ||
| 1 | 1 | from typing import Optional, Callable  | 
            |
| 15 | 1 | def __init__(  | 
            |
| 16 | self,  | 
            ||
| 17 | container: ExtendableContainer,  | 
            ||
| 18 | update_function: Optional[  | 
            ||
| 19 | Callable[[ReadableContainer], ReadableContainer]  | 
            ||
| 20 | ] = None,  | 
            ||
| 21 | ):  | 
            ||
| 22 | 1 | self._base_container = container  | 
            |
| 23 | 1 | self._update_function = update_function  | 
            |
| 24 | 1 | if self._update_function:  | 
            |
| 25 | 1 | self._build_temporary_container = lambda: self._update_function(  | 
            |
| 26 | self._base_container  | 
            ||
| 27 | )  | 
            ||
| 28 | else:  | 
            ||
| 29 | 1 | self._build_temporary_container = lambda: self._base_container.clone()  | 
            |
| 30 | |||
| 39 |