Skip to content

pctx-py: add ty type checking, split Makefile, refine @tool#75

Merged
eliasposen merged 2 commits intomainfrom
python-ty
May 8, 2026
Merged

pctx-py: add ty type checking, split Makefile, refine @tool#75
eliasposen merged 2 commits intomainfrom
python-ty

Conversation

@eliasposen
Copy link
Copy Markdown
Contributor

Summary

  • Type checking with ty: added ty as a dev dep, fixed all type errors it surfaced in _client.py, _convert.py, _tool.py, _websocket_client.py, descriptions/init.py, and models.py. Includes a real bug fix in _websocket_client.execute_typescriptExecuteCodeParams(style=disclosure) was silently dropped by pydantic, so the websocket path always used CATALOG regardless of the caller's disclosure arg.
  • Makefile split: moved Python-specific targets out of the root Makefile into a new pctx-py/Makefile. Added install, lint, typecheck, and check (lint+typecheck+test) targets.
  • CI: renamed the lint job to check, added a Type check step, and gated the static-analysis steps on !cancelled() && install.outcome == 'success' so a single CI run surfaces all formatting/lint/typecheck issues at once.
  • @tool decorator polish: input_schema accepts a Pydantic BaseModel or JSON Schema dict; output_schema accepts a Python type / typing construct or JSON Schema dict; name is now keyword-only.
  • Changelog: added pctx-py/CHANGELOG.md with backfilled history.

Test plan

  • make -C pctx-py check passes locally
  • CI check job runs format / lint / typecheck and surfaces all failures in one run
  • CI test matrix passes on 3.10–3.13
  • Verify disclosure arg now reaches the websocket execute path (fixed bug)

🤖 Generated with Claude Code

@eliasposen eliasposen changed the base branch from main to tool-ergonomics May 7, 2026 22:00
Base automatically changed from tool-ergonomics to main May 8, 2026 15:58
Copy link
Copy Markdown
Collaborator

@pk8189 pk8189 left a comment

Choose a reason for hiding this comment

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

type checking good

@eliasposen eliasposen merged commit 0b9312d into main May 8, 2026
10 checks passed
@eliasposen eliasposen deleted the python-ty branch May 8, 2026 16:01
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