Skip to content

Commit

Permalink
πŸ”„ Update Union parser instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Jan 22, 2024
1 parent 6bf5896 commit 26bee8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/funcchain/parser/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def parser_for(
Get the parser from the type annotation of the parent caller function.
"""
if isinstance(output_type, types.UnionType) or getattr(output_type, "__origin__", None) is Union:
output_type = output_type.__args__[0] # type: ignore
return RetryJsonPydanticUnionParser(pydantic_objects=output_type.__args__) # type: ignore # TODO: fix this
# output_type = output_type.__args__[0] # type: ignore
return RetryJsonPydanticUnionParser() # type: ignore # TODO: fix this
if output_type is str:
return StrOutputParser()
if output_type is bool:
Expand Down

0 comments on commit 26bee8a

Please sign in to comment.