🔧 chore(field_typing): rename import_template_field() to _import_template_field() for internal use only

🐛 fix(field_typing): fix circular import issue by renaming import_template_field() to _import_template_field()
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-12-10 20:33:55 -03:00
commit f055c99f5a

View file

@ -27,7 +27,7 @@ from .constants import (
from .range_spec import RangeSpec
def import_template_field():
def _import_template_field():
from langflow.template.field.base import TemplateField
return TemplateField
@ -36,7 +36,7 @@ def import_template_field():
def __getattr__(name: str) -> Any:
# This is to avoid circular imports
if name == "TemplateField":
return import_template_field()
return _import_template_field()
elif name == "RangeSpec":
return RangeSpec
# The other names should work as if they were imported from constants