mirror of https://github.com/microsoft/autogen.git
Remove unneeded duplicate check for pydantic v1 since we are already checking that in the else block. (#2467)
* Remove unneeded duplicate check for pydantic v1 since we are already in the else block. * fix formatting
This commit is contained in:
parent
5b6ae324e2
commit
ba9ff45adb
|
@ -64,7 +64,7 @@ else: # pragma: no cover
|
|||
Returns:
|
||||
JsonSchemaValue: The JSON schema
|
||||
"""
|
||||
if PYDANTIC_V1:
|
||||
|
||||
if t is None:
|
||||
return {"type": "null"}
|
||||
elif get_origin(t) is Union:
|
||||
|
@ -77,7 +77,7 @@ else: # pragma: no cover
|
|||
"prefixItems": prefixItems,
|
||||
"type": "array",
|
||||
}
|
||||
|
||||
else:
|
||||
d = schema_of(t)
|
||||
if "title" in d:
|
||||
d.pop("title")
|
||||
|
|
Loading…
Reference in New Issue