astral-sh / astral-sh/ruff-vscode

Indicate whether a proposed fix is unsafe

Open
#342 3 comments 0 reactions 0 assignees View on GitHub
code-actions enhancement
Dominant language
TypeScript
Stars
1.7k
Forks
80
Avg merge
8h 22m
Merged PRs (30d)
22

Description

For example, this one would break the code (because `is not` cannot be overridden, so for certain SQLAlchemy comparisions, `==`/`!=` comparisons against `None` are required):

![image](https://github.com/astral-sh/ruff-vscode/assets/179599/95ae3e03-0554-42c2-8783-df8c95354119)

Of course I know that it would not be safe to "fix" it, but maybe a less experienced developer might blindly apply the fix instead of adding noqa and then wonder why their code does not work.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SQLAlchemy comparison example in the Ruff VS Code extension and reviewing how proposed fixes are presented. Done means the extension clearly indicates when a proposed fix is unsafe, while safe fixes remain available and users can choose an appropriate alternative such as adding noqa.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, 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.