Skip to content

[codex] Add Python type checker config examples#9

Merged
michaelmwu merged 1 commit into
mainfrom
michaelmwu/python-typechecker-configs
Jun 28, 2026
Merged

[codex] Add Python type checker config examples#9
michaelmwu merged 1 commit into
mainfrom
michaelmwu/python-typechecker-configs

Conversation

@michaelmwu

@michaelmwu michaelmwu commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Add example Pyright, Pyrefly, and ty configuration blocks to the Python stack pyproject.toml.
  • Document how projects should choose a single Python type checker as the CI gate.
  • Keep MyPy as the current default gate while recommending Pyrefly/Pyright/ty based on project needs and maturity.

Validation

  • python3 -c 'import pathlib, tomllib; tomllib.loads(pathlib.Path("stacks/python/pyproject.toml").read_text()); print("pyproject ok")'
  • bun run format:check

Summary by CodeRabbit

  • Documentation
    • Added guidance for Python projects on choosing a single CI type-checker and how to update the setup when switching tools.
    • Expanded the Python stack notes with clearer recommendations for MyPy, Pyright, Pyrefly, and ty.
    • Added example configuration for additional type-checker setups in the Python project template.

Copilot AI review requested due to automatic review settings June 28, 2026 12:48
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1bbc7a7-77b3-4b4a-8e09-d520631871a1

📥 Commits

Reviewing files that changed from the base of the PR and between 8b36d0d and c6197a5.

📒 Files selected for processing (3)
  • docs/tooling.md
  • stacks/python/README.md
  • stacks/python/pyproject.toml

📝 Walkthrough

Walkthrough

Adds configuration blocks for Pyright, Pyrefly, and ty to stacks/python/pyproject.toml, and updates docs/tooling.md and stacks/python/README.md with guidance on selecting a single type checker as the CI gate and steps for switching it.

Changes

Python Type Checker Config and Docs

Layer / File(s) Summary
Alternative type checker config blocks
stacks/python/pyproject.toml
Adds [tool.pyright], [tool.pyrefly], and [tool.ty.*] sections specifying Python 3.12, strict mode (Pyright), and repo include/search paths mirroring the workspace layout.
CI gate selection guidance
docs/tooling.md, stacks/python/README.md
Documents recommended defaults (MyPy, Pyrefly, Pyright, ty), when to prefer each, and follow-up steps (update typecheck.sh, dev deps, regenerate uv.lock) when switching the CI gate.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Four type checkers, lined up in a row,
Pyright strict, Pyrefly ready to go,
MyPy defaults, ty tries its best—
Pick just one gate to put to the test!
One rabbit checks types, the rest take a rest. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding Python type checker config examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch michaelmwu/python-typechecker-configs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

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 expands the Python stack’s guidance by adding example configuration blocks for multiple Python type checkers in pyproject.toml, and documenting that downstream projects should pick exactly one checker as their CI “gate” (while still keeping MyPy as the default in this devkit stack).

Changes:

  • Added example pyproject.toml config sections for Pyright, Pyrefly, and ty alongside the existing MyPy config.
  • Documented recommended scenarios for choosing Pyrefly vs Pyright vs MyPy, and keeping ty as advisory/experimental.
  • Clarified in stack docs that only one type checker should be enforced in CI, with MyPy remaining the default gate.

Reviewed changes

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

File Description
stacks/python/README.md Notes that the stack includes multiple type checker config examples and advises keeping a single CI gate.
stacks/python/pyproject.toml Adds example configuration blocks for Pyright, Pyrefly, and ty.
docs/tooling.md Documents type-checker selection guidance and reminds maintainers to update typecheck.sh and deps when switching gates.

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

@michaelmwu michaelmwu merged commit 2fa0585 into main Jun 28, 2026
11 checks passed
@michaelmwu michaelmwu deleted the michaelmwu/python-typechecker-configs branch June 28, 2026 13: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