| 32 | |
| 33 | |
| 34 | class ConfigField(BaseModel): |
| 35 | name: str |
| 36 | input_type: HTMLInputType = HTMLInputType.TEXT |
| 37 | label: Optional[str] = None |
| 38 | placeholder: Optional[str] = None |
| 39 | |
| 40 | def __init__(self, **data): |
| 41 | name = data.get("name") |
| 42 | label = data.get("label") or name.title() |
| 43 | data["label"] = label |
| 44 | data["placeholder"] = data.get("placeholder") or label |
| 45 | super().__init__(**data) |
| 46 | |
| 47 | class Config: |
| 48 | use_enum_values = True |
| 49 | |
| 50 | |
| 51 | class BaseDataSource(ABC): |
no outgoing calls
no test coverage detected