Skip to content

Fixed #176 -- Added Request imports to auth snippets. - #183

Merged
DevilsAutumn merged 1 commit into
DevilsAutumn:mainfrom
pollychen-lab:docs/add-request-imports
Jul 27, 2026
Merged

Fixed #176 -- Added Request imports to auth snippets.#183
DevilsAutumn merged 1 commit into
DevilsAutumn:mainfrom
pollychen-lab:docs/add-request-imports

Conversation

@pollychen-lab

Copy link
Copy Markdown
Contributor

What

  • Add Request to the import lines in the docs snippets that annotate authenticate(ctx: Request).

Why

The affected snippets in the testing, actions, and MCP docs use Request in the authenticator signature but did not import it, so copying them as-is would raise NameError.

Validation

  • python3 snippet consistency check for nearby Request imports
  • uv run --no-sync python scripts/generate_reference.py --check
  • uv run --no-sync ruff check .
  • uv run --no-sync pytest -q
  • git diff --check

Fixes #176

@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown

Greptile Summary

Added the missing Request import to authentication examples in the actions, MCP, and testing documentation so the snippets can be copied and executed without a NameError.

Confidence Score: 5/5

The documentation-only change appears safe to merge.

No blocking failure remains.

T-Rex T-Rex Logs

What T-Rex did

  • The pre-change validation failed with exit 1 due to missing Request imports in the affected approval/action, approval/MCP, and MCP-testing snippets.
  • The local resolution identified that the imported symbol resolves to quater.request.Request within the quater/__init__.py module.
  • The post-change validation passed with exit 0 and reported TOTAL_AFFECTED=6, TOTAL_FAILURES=0, OVERALL=PASS.
  • Artifacts were collected to document the results, including a Python source artifact and two verification logs covering the pre-change and post-change runs.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
docs/en/dev/actions.md Adds Request to the approval example’s Quater imports, matching its authenticator annotation.
docs/en/dev/mcp.md Adds Request to the approval-protected MCP tool example’s imports.
docs/en/dev/testing.md Adds Request to the MCP testing example’s imports.

Reviews (4): Last reviewed commit: "Fixed #176 -- Added Request imports to a..." | Re-trigger Greptile

@DevilsAutumn

Copy link
Copy Markdown
Owner

Hi @pollychen-lab , Thanks for this PR. Can you please make sure the commit msg and PR title is as per our Contributing guidelines.

@pollychen-lab
pollychen-lab force-pushed the docs/add-request-imports branch from 58cf1e3 to d284488 Compare July 27, 2026 06:19
@pollychen-lab pollychen-lab changed the title docs: add Request imports to auth snippets Fixed #176 -- Added Request imports to auth snippets. Jul 27, 2026
Comment thread package-lock.json

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why do we need changes in the package lock file? 🤔
This is unrelated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why do we need changes in the package lock file? 🤔 This is unrelated.

Hi @DevilsAutumn thanks for catching that. I removed it.

@pollychen-lab
pollychen-lab force-pushed the docs/add-request-imports branch from d284488 to 8762a5d Compare July 27, 2026 06:47

@DevilsAutumn DevilsAutumn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good, thank you @pollychen-lab ! ⭐

@DevilsAutumn
DevilsAutumn merged commit 509ee5b into DevilsAutumn:main Jul 27, 2026
6 checks passed
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.

Fix missing Request imports in docs snippets

2 participants