codedoctor🩺
Pre-commit gates that run each heavy check once per commit, sized to the machine and below interactive priority.
Quick Start
# Mac:
# # Required for quick install.
# brew install uv
# Ubuntu/Debian:
# # Required for quick install.
# sudo apt-get install -y curl
# curl -LsSf https://astral.sh/uv/install.sh | sh
uv add --dev codedoctor
# Alternatively: python -m pip install codedoctor
pre-commit calls a hook once per chunk of file names, so --all-files starts a
type checker or pytest several times over. Each heavy gate here is two hooks: a
-spool twin collects every chunk, then the gate runs once over all of them,
at this machine's worker count.
Example
A .pre-commit-config.yaml pair for ty:
repos:
- repo: local
hooks:
- id: ty-check-spool
name: ty-check-spool
alias: ty-check
language: system
require_serial: true
types_or: [python, pyi]
entry: uv run python -m codedoctor.gate spool ty-check
- id: ty-check
name: ty-check
language: system
require_serial: true
pass_filenames: false
types_or: [python, pyi]
entry: uv run python -m codedoctor.typecheck ty-check
This repository's own .pre-commit-config.yaml wires
every gate and is the fullest example.
Gates
| Module | Runs |
|---|---|
codedoctor.gate |
spool, run and threaded: the shared machinery |
codedoctor.typecheck |
ty-check, pyrefly-check, basedpyright |
codedoctor.testing |
the tests paired with each changed file, and whole-suite tiers |
codedoctor.coverage_floor |
each changed source's coverage by its own tests |
codedoctor.mutation |
mutation testing of the changed functions (codedoctor[mutation]) |
codedoctor.lint |
houselint, AST rules configured in [tool.houselint] |
codedoctor.assert_isinstance |
deletes each assert isinstance a checker proves redundant |
codedoctor.affected |
the tests and files a change reaches, from a CodeGraph index |
codedoctor.nbstripout |
notebook output stripping |
codedoctor.selected_nodeids |
a pytest plugin writing a run's selected node ids |
Worker counts: WORKERS_<HOOK_ID> wins, then WORKERS_DEFAULT, then a count
derived from the machine's cores and free memory.
Metadata
Release files for codedoctor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codedoctor-0.1.2.tar.gz | 488.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codedoctor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 690.2 kB
Release files / codedoctor-0.1.2.tar.gz
| Download URL | codedoctor-0.1.2.tar.gz |
|---|---|
| Size | 488.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9f762bcd3b81eae20d4acd9bb33c18546a62e31f53c86cafb8e69cfd9f02e2f
|
|
BLAKE2b-256 checksum How to use checksums |
e87927adacc9fdf303fc3c2e3c5d3a037cb2132338a3aa06061e75f77e8498d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / codedoctor-0.1.2-py3-none-any.whl
| Download URL | codedoctor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 201.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19af17aef1c96a7e9f14c91bf9e9b38b8217fe0c783cdcb7a1f7fd0b3ceb4a33
|
|
BLAKE2b-256 checksum How to use checksums |
ef29f6180776dd60c87e93524a15fd5b42c2979bcda7928a6fa0b98cee09b65d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for codedoctor 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for codedoctor-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.