🔧 chore(component.py): add missing import for 'Any' type in typing module to fix type hinting

🚀 feat(component.py): add 'build' method to Component class to enforce implementation in subclasses
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-04 09:53:50 -03:00
commit 5608b197f2

View file

@ -1,5 +1,5 @@
import ast
from typing import Optional
from typing import Any, Optional
from pydantic import BaseModel
from fastapi import HTTPException
@ -67,3 +67,6 @@ class Component(BaseModel):
template_config["beta"] = ast.literal_eval(item_value)
return template_config
def build(self, *args: Any, **kwargs: Any) -> Any:
raise NotImplementedError