| Conditions | 3 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | """ |
||
| 42 | 1 | def __init__(self, **kwargs): |
|
| 43 | 1 | if len(kwargs) == 0: |
|
| 44 | 1 | prefix = f"{self.PREFIX}_" if self.PREFIX else "" |
|
| 45 | 1 | envs = os.environ.items() |
|
| 46 | 1 | super().__init__( |
|
| 47 | **{ |
||
| 48 | key.replace(prefix, "").lower(): value |
||
| 49 | for (key, value) in envs |
||
| 50 | if key.startswith(prefix) |
||
| 51 | } |
||
| 52 | ) |
||
| 53 | else: |
||
| 54 | super().__init__(**kwargs) |
||
| 55 |