Skip to content

feat: accept the table view style - #270

Merged
amix merged 1 commit into
mainfrom
amix/view-style-table
Nov 3, 2026
Merged

amix merged 1 commit into
mainfrom
amix/view-style-table

Conversation

@amix

@amix amix commented Nov 2, 2026

Copy link
Copy Markdown
Member

Context

  • Table becomes a regular project view style in the API, like list, board and calendar (Doist/Todoist#31065).

What was changed

  • add_project / update_project accept view_style="table", and ViewStyle includes it.
  • Docstrings list all four view styles.
  • test_add_project_full covers table as well as board.

Refs

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amix
amix requested a review from a team as a code owner November 2, 2026 11:53
@amix
amix requested review from PotHix and removed request for a team November 2, 2026 11:53

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR cleanly adds table as a fourth project view style, updating the ViewStyle definitions, the add_project/update_project docstrings, and extending the parametrized test coverage for both sync and async clients. No inline issues were flagged. One minor note: the allowed values now live as two parallel ViewStyle definitions that must be kept in sync manually — worth keeping an eye on as view styles evolve, though unifying them may be out of scope here.

I also included a few optional follow-up notes in the details below.

Optional follow-up notes (2)
  • P3 todoist_api_python/types.py:38: The allowed values are duplicated here and in models.py's ViewStyle Literal, so every new view style (like this PR's "table") must be added in both places. To keep a single source of truth, types.py could reuse the Literal, e.g. Predicate(lambda value: value in get_args(models.ViewStyle)), or the Literal could be defined here and re-exported by models.py.
  • P3 tests/test_api_projects.py:163: test_add_project_full now covers table for add_project, but the same PR also adds table to update_project and no test passes view_style through that path (test_update_project's args omit it). Add view_style: "table" to test_update_project's request/response args, or parameterize that test as well, so the update passthrough is protected.

Share Feedback • Review Logs

@amix
amix merged commit bdfc87a into main Nov 3, 2026
6 checks passed
@amix
amix deleted the amix/view-style-table branch November 3, 2026 04:48
@amix amix mentioned this pull request Nov 3, 2026
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