8000 fix(notes): narrow read_note's draft page so mypy passes by adeelahmad · Pull Request #143 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(notes): narrow read_note's draft page so mypy passes - #143

Merged
adeelahmad merged 1 commit into
mainfrom
claude/notes-module-j9j30y
Oct 4, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/notes-module-j9j30y

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Before: make lint failed on main. mypy reported app/api/mcp_tools.py:1210, where the MCP read_note tool assigned a page that could be a draft (NotePage | NotePageDraft) to a variable typed NotePage.

After: mypy passes. Behaviour is unchanged.

How: the result of page_about now goes into its own variable. The tool returns early unless that result is a NotePage, as it already did for a draft, and only then uses it as p. Checked with mypy (no issues in 121 files), ruff, and tests/api/test_mcp.py (14 passed).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
@adeelahmad
adeelahmad merged commit 5f799f2 into main Oct 4, 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

0