compare-python-typecheckers
Compare Python type inference with ty, pyrefly, basedpyright, and mypy.
소스 정보
- 저장소
- JetBrains/intellij-community
- 최근 소스 활동
- 2026년 8월 5일 18:20
- 감지된 SKILL.md 언어
- 영어
- 스타
- 20,445
- 포크
- 6,009
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
파일 탐색기
2 개 파일SKILL.md 표시 중
SKILL.md
소스 지침 · 읽기 전용 미리보기- name
- compare-python-typecheckers
- description
- Compare Python type inference with ty, pyrefly, basedpyright, and mypy.
<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/compare-python-typecheckers/SKILL.md -->
# Compare Python type checkers
When reasoning about how PyCharm *should* infer a type or whether something ought
to be a type error, cross-checking against the real third-party checkers is the
fastest way to gain insight — and to see where they disagree. This skill runs
them all on a scratch file or snippet and collates the output into a single
report.
## Run it
`${CLAUDE_SKILL_DIR}/scripts/compare_typecheckers.py` invokes each checker
through `uvx` (fetched on demand — no install; the network is used on first run)
and prints a Markdown report: a summary table (exit code / verdict / timing per
tool) followed by each tool's raw output.
```bash
# Inline snippet:
uv run ${CLAUDE_SKILL_DIR}/scripts/compare_typecheckers.py -c 'def f(x: int) -> int:
return x
f("a")'
# An existing file:
uv run ${CLAUDE_SKILL_DIR}/scripts/compare_typecheckers.py path/to/test.py
# A subset, written to a file:
uv run ${CLAUDE_SKILL_DIR}/scripts/compare_typecheckers.py test.py --tools ty,mypy -o /tmp/report.md
```
Flags: `-c/--code` (inline snippet), `-t/--tools ty,mypy,…` (subset), `-o/--output`
(write to file), `--timeout` (per-checker seconds, default 180). The script exits
0 whenever it produced a report — findings live in the report, not the exit code.
## Reading the result
- The summary table shows each tool's exit code (**0 = nothing flagged**,
non-zero = the checker reported an issue or failed to run), a verdict, and time.
- Output **formats differ** per tool, so read each section, not just the table:
- `ty` (Astral) and `pyrefly` (Meta) each have their own diagnostic style.
- `basedpyright` is pyright-based and also emits extra diagnostics such as
`reportUnusedCallResult`.
- `mypy` and `zuban` share the same message format (`zuban` is mypy-compatible).
- The checkers track their latest releases through `uvx`, so behaviour can shift
over time — record the date when capturing results in a YouTrack issue or test.
## Manual one-offs
The exact per-tool invocations, if you want to run just one by hand (note
`basedpyright` takes the file positionally — no `check` subcommand):
| Tool | Command |
|------|---------|
| ty | `uvx ty check test.py` |
| pyrefly | `uvx pyrefly check test.py` |
| basedpyright | `uvx basedpyright test.py` |
| mypy | `uvx mypy test.py` |
| zuban | `uvx zuban check test.py` |
GitHub에서 보기