Include attachments in TSV and JSON formatted output#847
Include attachments in TSV and JSON formatted output#847shanemcd wants to merge 3 commits intoinsanum:mainfrom
Conversation
|
@kody start-review |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody Configuration@reviewOptions |
|
FYI the check failures are just some unused imports and long lines the linter wants you to fix. |
7f7ea00 to
7d74d9d
Compare
- Remove unused imports in tests/test_details.py - Fix line length violations in gcalcli/details.py and tests/test_details.py - Shorten docstrings and split long lines to meet 80 char limit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody Configuration@reviewOptions |
The previous implementation unconditionally raised ReadonlyCheckError, which prevented updating any event with attachments, even when modifying other fields. This broke the workflow of exporting to TSV, modifying other fields, and importing back. Now follows the same pattern as other read-only handlers (like Url): only raise an error when the attachment value actually changes. Added tests to verify: - Patching with unchanged value doesn't raise error - Patching with changed value raises ReadonlyCheckError - Patching events without attachments works correctly Fixes review feedback from insanum#847 (comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody Configuration@reviewOptions |
|
@dbarnett hi, checking in to see if there's anything else I can do to help get this merged. Thank you. |
Hello. This is a patch for #827. Following your lead in #829. Happy to continue iterating on this if you have any feedback. Thank you.
The
Attachments.patchmethod has been updated to refine its read-only behavior. Previously, any attempt to patch theattachmentsfield would unconditionally raise aReadonlyCheckError.With this change, the method now first compares the provided
valuewith the event'scurrent_valuefor attachments. AReadonlyCheckErroris only raised if an actual modification is attempted (i.e.,current_value != value). This allows for "patching" the attachments field with its existing value without triggering an error, while still preventing any actual changes to a different value.New tests have been added to confirm this behavior, ensuring that patching with an unchanged value succeeds and patching with a different value correctly raises a
ReadonlyCheckError.