Open cobycloud opened 1 week ago
Logs from v0.4.1.x/tools
build
SubclassUnion is failing because the tools are called within the function, meaning the tools are local instead of global.
Additionally, I'm unsure why we are seeing tools.<tool-name>.[ToolBase | AdditionTool]
appearing, I'm not certain how AdditionTool
is becoming included as such.
In general, this represents a failure to the current approach and a difficulty to overcome.
FAILED tests/toolkits/AccessibilityToolkit_test.py::test_serialization - pydantic_core._pydantic_core.ValidationError: 10 validation errors for AccessibilityToolkit
tools.AutomatedReadabilityIndexTool.ToolBase.type
Input should be 'ToolBase' [type=literal_error, input_value='AutomatedReadabilityIndexTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.AutomatedReadabilityIndexTool.AdditionTool.type
Input should be 'AdditionTool' [type=literal_error, input_value='AutomatedReadabilityIndexTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.ColemanLiauIndexTool.ToolBase.type
Input should be 'ToolBase' [type=literal_error, input_value='ColemanLiauIndexTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.ColemanLiauIndexTool.AdditionTool.type
Input should be 'AdditionTool' [type=literal_error, input_value='ColemanLiauIndexTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.FleschKincaidTool.ToolBase.type
Input should be 'ToolBase' [type=literal_error, input_value='FleschKincaidTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.FleschKincaidTool.AdditionTool.type
Input should be 'AdditionTool' [type=literal_error, input_value='FleschKincaidTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.FleschReadingEaseTool.ToolBase.type
Input should be 'ToolBase' [type=literal_error, input_value='FleschReadingEaseTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.FleschReadingEaseTool.AdditionTool.type
Input should be 'AdditionTool' [type=literal_error, input_value='FleschReadingEaseTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.GunningFogTool.ToolBase.type
Input should be 'ToolBase' [type=literal_error, input_value='GunningFogTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
tools.GunningFogTool.AdditionTool.type
Input should be 'AdditionTool' [type=literal_error, input_value='GunningFogTool', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/literal_error
Also see the issue below, where deserialization fails as the AdditionTool was not added to the list of
let's state our requirements here:
Affected Component
This will impact all components
Motivation
Requirements
Potential Refactoring Approach
Suggestions
__all__
in__init__.py
Additional Context (optional)
No response
Affected Areas
Priority
Critical