Commit Graph

3 Commits

Author SHA1 Message Date
Devin AI
d8f52e69be Fix lint errors and test expectations for UnionType support
- Remove unused imports from both files to fix lint errors
- Update test expectations to match actual schema output format
- Python 3.10+ union syntax now outputs 'str | None' instead of 'Optional[str]'
- All local tests pass and core functionality verified

Co-Authored-By: João <joao@crewai.com>
2025-06-26 16:31:29 +00:00
Devin AI
b4b6e0d803 Fix pydantic_schema_parser to handle Python 3.10+ union syntax (types.UnionType)
- Add support for types.UnionType in addition to typing.Union
- Fix AttributeError when processing str | None syntax
- Add comprehensive tests for both union syntaxes
- Handle types without __name__ attribute gracefully
- Resolves issue #3074

Co-Authored-By: João <joao@crewai.com>
2025-06-26 16:26:03 +00:00
Brandon Hancock (bhancock_ai)
b5779dca12 Fix nested pydantic model issue (#1905)
* Fix nested pydantic model issue

* fix failing tests

* add in vcr

* cleanup

* drop prints

* Fix vcr issues

* added new recordings

* trying to fix vcr

* add in fix from lorenze.
2025-01-16 11:28:58 -05:00