Syntax for ignoring error due to an issue
Open
Nobody has claimed this yet.
feature
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Sometimes you want to ignore an error stemming from a known mypy issue. Commenting with # type:ignore[issue-12345] would do that.
Behavior:
- If mypy does not have the issue closed, ignore errors on that line.
- If mypy has the issue closed, no longer ignore errors on that line, but also don't deem it as unused ignore (which is what would happen if you just
# type: ignoreand run withwarn_unused_ignore).
To make it happen, mypy would ship with an ever-growing list of closed issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named in the issue. Start by locating mypy's handling of # type: ignore comments and issue identifiers, then determine how closed issues would be tracked. Done means unresolved issue references suppress errors, while closed references stop suppressing errors without triggering an unused-ignore warning.
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