refactor: Update langflow schema field module to use consistent type hinting for better clarity and consistency
This commit is contained in:
parent
f0386ea6ec
commit
86dfeb7eff
1 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,13 @@
|
|||
from enum import Enum
|
||||
from typing import Any, Callable, GenericAlias, Optional, Union, _GenericAlias, _UnionGenericAlias # type: ignore
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
GenericAlias,
|
||||
Optional, # type: ignore
|
||||
Union,
|
||||
_GenericAlias,
|
||||
_UnionGenericAlias,
|
||||
)
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_serializer, field_validator, model_serializer, model_validator
|
||||
|
||||
|
|
@ -181,6 +189,8 @@ class Output(BaseModel):
|
|||
|
||||
def add_types(self, _type: list[Any]):
|
||||
for type_ in _type:
|
||||
if self.types is None:
|
||||
self.types = []
|
||||
self.types.append(type_)
|
||||
|
||||
def set_selected(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue