Skip to content

ruff server: An empty code action filter no longer returns notebook source actions - #11526

Merged
snowsignal merged 2 commits into
mainfrom
jane/server/no-duplicate-code-actions
May 24, 2024
Merged

snowsignal merged 2 commits into
mainfrom
jane/server/no-duplicate-code-actions

Conversation

@snowsignal

Copy link
Copy Markdown
Contributor

Summary

Fixes #11516

ruff server was sending both regular source actions and notebook source actions back when passed an empty action filter. This PR makes a few small changes so that notebook source actions are not sent when regular source actions are sent, which means that an empty filter will only return regular source actions.

Test Plan

I confirmed that duplicate code actions no longer appeared in Neovim, using a configuration similar to the one from the original issue.

Screenshot 2024-05-23 at 11 48 48 PM

@snowsignal snowsignal added bug An issue describing something that isn't working, or a PR that fixes a bug server Related to the Ruff or ty LSP server labels May 24, 2024
@github-actions

github-actions Bot commented May 24, 2024 •

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Comment thread crates/ruff_server/src/server/api/requests/code_action.rs
@snowsignal
snowsignal enabled auto-merge (squash) May 24, 2024 07:17
@snowsignal
snowsignal merged commit 81275a6 into main May 24, 2024
@snowsignal
snowsignal deleted the jane/server/no-duplicate-code-actions branch May 24, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue describing something that isn't working, or a PR that fixes a bug server Related to the Ruff or ty LSP server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ruff server: duplicate code actions

2 participants