skillfed

mypy_baseline

Integrate mypy with existing codebase.

mypy-baseline v0.7.4 693.6K downloads/30d#5,315 on PyPI82
Permissive license Active released

What it is and what it does

mypy-baseline is a CLI wrapper around mypy that lets you adopt type checking incrementally on an existing project without being overwhelmed by pre-existing violations. On first run, it records all current mypy errors into a human-readable baseline file; on subsequent runs, it filters mypy's output to show only new errors you've introduced, ignoring everything already in the baseline. This lets teams gradually improve type coverage without having to fix all historical violations at once.

The tool works by parsing mypy's stdout—no patching or monkey-patching involved—and can track which specific errors were resolved versus newly introduced, even within the same file. It supports filtering by error category and regex patterns to suppress false positives from buggy plugins, and generates progress stats to show your team's improvement over time.

Use it for:

  • Adopting mypy on a large legacy codebase without requiring all existing type errors to be fixed first.
  • Enforcing that new code passes type checking while allowing old code to remain untyped.
  • Tracking team progress on type annotation coverage with visual stats and git history.
  • Suppressing false positives from third-party mypy plugins that don't affect your actual code.
  • Reviewing PRs to see exactly which type errors were introduced versus resolved in that change.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A CLI tool that captures mypy type errors as a baseline on first run, then filters out only pre-existing errors on subsequent runs to show you only new violations you've introduced.

Yes. If you want to adopt mypy on an existing project without the friction of fixing all pre-existing errors first, this is the right tool. It has no dependencies, low friction, active maintenance, permissive licensing, and solves a real adoption problem. Install it if incremental type-checking adoption is your goal.

Install

mypy-baseline on PyPI

pip

pip install mypy-baseline

uv

uv add mypy-baseline

poetry

poetry add mypy-baseline

Installing mypy_baseline

Before you install

Low install friction; pure Python with no runtime dependencies. Active maintenance with recent commits and stable production status.

License in practice

MIT license (permissive); you can use, modify, and distribute freely with minimal restrictions.

Quickstart

pip install mypy-baseline

# Generate baseline from current mypy output
mypy | mypy-baseline sync

# On subsequent runs, filter to show only new errors
mypy | mypy-baseline filter

Requires Python 3.9 or later and mypy installed separately.

Verify before relying

  • Whether the tool works with all mypy versions or has specific version constraints.
  • How baseline merge conflicts are actually avoided in practice across team workflows.
  • Performance characteristics when applied to very large codebases.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 123 days since the last release
Last repo commit
First released
Downloads 693,611/month — #5,315 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mypy_baseline-0.7.4-py3-none-any.whl

Keywords: mypy, baseline, typing, annotations, type annotations

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonTyping :: Typed

Tags

mypy baseline integrationtype error filteringincremental mypy adoptionmypy progress trackingignore existing type errors
type-checkingmypyincremental-adoption

More Quality Assurance packages