python / python/mypy

Request: equivalent CLI option to `ruff`'s `--add-noqa` to add `type: ignore` comments

Open
#16,751 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Feature

ruff has an --add-noqa option to add noqa directives in all places: https://docs.astral.sh/ruff/linter/#inserting-necessary-suppression-comments

It would nice if mypy had something similar, like a --add-ignore CLI argument

Pitch

This would enable a new route to adopt mypy, mainly suppressing all type errors with type: ignore comments, and slowly removing them over time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are named. Start by reviewing mypy's CLI entry point and compare the requested --add-ignore behavior with Ruff's --add-noqa documentation. Done means a documented CLI option can add type: ignore comments for reported errors and support gradual adoption.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.