nkhitrov

nkhitrov / typemut

Public

Mutation testing for type annotation in python projects

12
1
100% credibility
Found Mar 25, 2026 at 12 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

typemut is a mutation testing tool for Python type annotations that verifies whether type checkers detect changes to type hints.

How It Works

1
🕵️ Discover typemut

While working on Python code, you hear about a helpful tool that tests if your type descriptions are strict enough to catch mistakes.

2
📥 Get the tool ready

You easily add the tool to your computer so it's available for your projects.

3
📝 Set up your project

You create a simple note telling the tool where your code folder is and how you normally check for type issues.

4
🚀 Launch the test

With one click, you start the magic: the tool sneaks tiny changes into your type descriptions and checks if your type checker spots them.

5
📊 Check quick results

A colorful screen summary appears, showing scores for each part of your code and highlighting weak spots.

6
🌐 Explore full report

You open a detailed webpage listing every sneaky change, with side-by-side comparisons and checker feedback.

Build stronger code

Confident in your types, you tighten them up, making your project safer and easier for everyone to work with.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 12 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is typemut?

typemut applies mutation testing python-style to type annotations: it tweaks hints like unions, optionals, and literals, then runs your type checker (mypy or pyright) to see if errors fire. Killed mutants prove your types are strict and coverage solid; survivors flag loose spots where code doesn't enforce them. Install via pip or uv, configure paths and test commands in a TOML file, then hit `typemut run` for discovery, execution, and reports.

Why is it gaining traction?

Unlike runtime tools like cosmic-ray, typemut targets static types with operators for real-world issues—removing union members, adding optionals, widening containers—revealing annotation gaps alternatives miss. HTML reports show diffs, checker output, and scores per module; parallel jobs speed large projects via git worktrees. It's github mutation testing refined for python type safety, skipping ignores and Anys automatically.

Who should use this?

Python backend teams with mypy/pyright enforcing types in APIs or data models, especially projects heavy on unions, generics, or optionals. Devs auditing type coverage before releases, or leads measuring "type mutation score" like test coverage. Pairs well with mutation testing in typescript or java for polyglot shops chasing stricter annotations.

Verdict

Early alpha (12 stars, 1.0% credibility) with solid docs and CLI, but test it on toy projects first—low maturity means expect tweaks. Worth adopting if type checking feels superficial; boosts confidence in python testing pipelines.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.