| Conditions | 2 |
| Total Lines | 5 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from abc import ABC, abstractmethod |
||
| 33 | @classmethod |
||
| 34 | def create(cls, backend_type, *args, **kwargs) -> DataBackend: |
||
| 35 | if backend_type not in cls.subclasses: |
||
| 36 | raise ValueError(f"Request Backend of type '{backend_type}'; supported are [{', '.join(sorted(cls.subclasses.keys()))}]") |
||
| 37 | return cls.subclasses[backend_type](*args, **kwargs) |
||
| 38 |