fix(tasks): rename json property to json_output to avoid BaseModel method conflict - #6553
fix(tasks): rename json property to json_output to avoid BaseModel method conflict#6553bunnysayzz wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRenames ChangesJSON output API
Merge Risk: ⚪ Minimal · up to This change moves JSON output access to json_output while restoring the inherited Pydantic json() method. No unresolved risk remains for the current change. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the conflict, lists the affected files, and describes testing. It does not follow the repository template because it omits the Related issue section, the Verification checklist, and the Additional context section. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…thod conflict The TaskOutput and CrewOutput classes inherit from Pydantic's BaseModel, which provides a built-in .json() method. Both classes defined a @Property named 'json' which shadowed BaseModel.json(), causing serialization conflicts. This renames the property to 'json_output' and updates all references. Closes the TODO comment in task_output.py that acknowledged this issue.
|
Synced back onto latest upstream main (was behind), no conflicts. JSON task tests pass, 8 of 9, the one failure is the live-OpenAI kickoff test that needs network access. |
Description
Both
TaskOutputandCrewOutputinherit from Pydantic'sBaseModel, which provides a built-in.json()method. Both classes defined a@propertynamedjsonwhich shadowedBaseModel.json(), causing serialization conflicts.This was acknowledged by a TODO comment in
task_output.py.Changes
@property def jsonto@property def json_output, removed the TODO comment and# type: ignore[override]@property def jsonto@property def json_output, removed the# type: ignore[override], added a docstringresult.jsontoresult.json_output, renamed test for consistencyTesting
BaseModel.json()method is now accessible again