Skip to content

fix(docs): add missing imports in documentation code snippets#288

Merged
sebpretzer merged 2 commits into
mainfrom
fix/285-missing-imports-in-docs
Mar 23, 2026
Merged

fix(docs): add missing imports in documentation code snippets#288
sebpretzer merged 2 commits into
mainfrom
fix/285-missing-imports-in-docs

Conversation

@sebpretzer

Copy link
Copy Markdown
Owner

Fixes: #285

Summary

  • Added from time import time to the V1 token generation code snippet in docs/guides/ticktick_api/generate_v1_token.md
  • Added client = Client() to the code snippets in docs/guides/cookbook/project_groups/get_a_project_group_by_id.md and get_a_project_group_by_name.md, which imported Client but never instantiated it

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 23, 2026 02:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes broken documentation code snippets in the TickTick API and cookbook guides by adding missing imports/initialization so the examples run as written.

Changes:

  • Add from time import time to the V1 token generation snippet so time() usage is valid.
  • Instantiate client = Client() in project group cookbook snippets that previously referenced client without defining it.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/guides/ticktick_api/generate_v1_token.md Adds the missing time import required by the token expiration calculation in the example.
docs/guides/cookbook/project_groups/get_a_project_group_by_name.md Defines client before calling client.get_batch_v2() in the snippet.
docs/guides/cookbook/project_groups/get_a_project_group_by_id.md Defines client before calling client.get_batch_v2() in the snippet.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sebpretzer sebpretzer merged commit 692325d into main Mar 23, 2026
7 checks passed
@sebpretzer sebpretzer deleted the fix/285-missing-imports-in-docs branch March 23, 2026 02:59
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.

Missing from time import time

2 participants