Conditions | 5 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
1 | # -*- coding: utf-8 -*- |
||
42 | 1 | def __init__(self, injector, inherit=False): |
|
43 | 1 | if _stack.is_empty: |
|
44 | 1 | if callable(injector): |
|
45 | 1 | injector = injector() |
|
46 | |||
47 | 1 | self._push(injector) |
|
48 | 1 | elif inherit: |
|
49 | 1 | if callable(injector): |
|
50 | 1 | injector = injector() |
|
51 | |||
52 | 1 | injector = merge_injectors(_stack.top.injector, injector) |
|
53 | 1 | self._push(injector) |
|
54 | |||
65 |