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