Skip to content

Commit

Permalink
Fix black error
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Aug 19, 2024
1 parent 338522f commit 2feebbe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions adala/utils/pydantic_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ def json_schema_to_pydantic_type(
else:
raise NotImplementedError(f"Unsupported JSON schema format: {format_}")
elif "enum" in json_schema:
return Literal[*json_schema["enum"]]
# return Enum(
# enum_class_name, {item: item for item in json_schema["enum"]}, type=str
# )
return Literal[tuple(json_schema["enum"])]
return str
elif type_ == "integer":
return int
Expand Down

0 comments on commit 2feebbe

Please sign in to comment.