pyspur
pyspur copied to clipboard
Refactor/base node simplification
This pull request introduces several changes to the workflow_executor.py file in the backend/pyspur/execution directory. The primary focus of these changes is to refactor the code to use BaseModel from pydantic instead of custom types, and to improve code readability and maintainability.
Refactoring to use BaseModel:
- Replaced
BaseNodeOutputwithBaseModelthroughout the file, including in function signatures and type hints. [1] [2] [3] [4] [5] [6] [7] [8]
Code readability improvements:
- Moved import statements to group related imports together and added
TypeVarfor type safety. - Simplified docstrings by removing unnecessary newlines and making them more concise. [1] [2] [3] [4]
- Added type annotations for variables and function return types to improve code clarity. [1] [2]
These changes enhance the overall structure and maintainability of the workflow_executor.py file while ensuring type safety and consistency in the codebase.
wow this is a major change … looks like a lot of interface breakage