Skip to content

Include attachments in TSV and JSON formatted output#847

Open
shanemcd wants to merge 3 commits intoinsanum:mainfrom
shanemcd:attachments-in-tsv-and-json
Open

Include attachments in TSV and JSON formatted output#847
shanemcd wants to merge 3 commits intoinsanum:mainfrom
shanemcd:attachments-in-tsv-and-json

Conversation

@shanemcd
Copy link
Copy Markdown

@shanemcd shanemcd commented Oct 14, 2025

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.patch method has been updated to refine its read-only behavior. Previously, any attempt to patch the attachments field would unconditionally raise a ReadonlyCheckError.

With this change, the method now first compares the provided value with the event's current_value for attachments. A ReadonlyCheckError is 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.

@dbarnett
Copy link
Copy Markdown
Collaborator

@kody start-review

@kody-ai
Copy link
Copy Markdown

kody-ai bot commented Oct 24, 2025

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration

@reviewOptions

Access your configuration settings here.

@dbarnett
Copy link
Copy Markdown
Collaborator

FYI the check failures are just some unused imports and long lines the linter wants you to fix.

@shanemcd shanemcd force-pushed the attachments-in-tsv-and-json branch from 7f7ea00 to 7d74d9d Compare October 28, 2025 18:37
- 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>
@kody-ai
Copy link
Copy Markdown

kody-ai bot commented Oct 28, 2025

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration

@reviewOptions

Access your configuration settings here.

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>
@kody-ai
Copy link
Copy Markdown

kody-ai bot commented Oct 28, 2025

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration

@reviewOptions

Access your configuration settings here.

@shanemcd shanemcd requested a review from dbarnett October 28, 2025 18:55
@shanemcd
Copy link
Copy Markdown
Author

shanemcd commented Dec 3, 2025

@dbarnett hi, checking in to see if there's anything else I can do to help get this merged. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants