microsoft / microsoft/vscode-mypy

Feature request: Offer "# type: ignore" quick fix for line and entire file

Open
#56 1 comment 15 reactions 0 assignees View on GitHub
feature-request needs community feedback
Dominant language
Python
Stars
150
Forks
39
Avg merge
21h 45m
Merged PRs (30d)
8

Description

I would like to request for the extension to offer a Quick Fix to suppress an error by adding:
- `# type: ignore[error-code]` at the end of the line
- or `# mypy: disable-error-code="error-code"` to the top of the file

Similar to how ESLint does it
![image](https://github.com/microsoft/vscode-mypy/assets/1350584/59629d4b-57e2-4132-af4e-25123cc87a68)

And better than pylance does it by also including the error code:
![image](https://github.com/microsoft/vscode-mypy/assets/1350584/3fcb0d6f-c04d-4335-95c5-93f12a7ec049)

Contributor guide

Open the contributing guide

Research direction

No files, tests, or implementation entry points are named. Start by locating the extension's existing Quick Fix handling and how mypy diagnostics expose error codes. Done means offering line and whole-file suppressions with the reported error code, matching the requested comment forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.