/type-heed

Auto-remove unused mypy type: ignore comments.

Primary LanguagePythonMIT LicenseMIT

Type Heed

Tests pre-commit.ci status Requires Python 3.8+ pre-commit

Auto-remove unused mypy # type: ignore comments from Python files. Can be used as a pre-commit hook.

Installation

pip install type-heed

Usage

CLI

type-heed path/to/file.py
# or
type-heed **/*.py

As pre-commit hook

Add this to your .pre-commit-config.yaml:

repos
  - repo: https://github.com/janosh/type-heed
    rev: v0.1.0
    hooks:
      - id: type-heed