| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | """ |
||
| 2 | Similar to the main definitions module but these definitions do not |
||
| 3 | yet have a stable interface. |
||
| 4 | """ |
||
| 5 | |||
| 6 | 1 | from ..definitions import X, ConstructionWithContainer |
|
| 7 | 1 | from ..interfaces import SpecialDepDefinition, ReadableContainer |
|
| 8 | |||
| 9 | |||
| 10 | 1 | class PlainFunction(SpecialDepDefinition[X]): |
|
| 11 | """Preserves a function without any dep injection performed on it""" |
||
| 12 | |||
| 13 | 1 | callable_func: X |
|
| 14 | |||
| 15 | 1 | def __init__(self, callable_func: X): |
|
| 16 | """""" |
||
| 17 | 1 | self.callable_func = callable_func |
|
| 18 | |||
| 19 | 1 | def get_instance(self, _container: ReadableContainer) -> X: |
|
| 20 | 1 | return self.callable_func |
|
| 21 | |||
| 22 | |||
| 23 | 1 | class AsyncConstructionWithContainer(ConstructionWithContainer): |
|
| 24 | pass |
||
| 25 |