Consider unsafe-fixes settings for code actions (#15666)

## Summary

Closes: #13960 

## Test Plan

Using the example from
https://github.com/astral-sh/ruff-vscode/issues/672:


https://github.com/user-attachments/assets/7bdb01ef-8752-4cb7-9b5d-8a0d131984da
This commit is contained in:
Dhruv Manilawala 2025-01-22 13:44:13 +05:30 committed by GitHub
parent 792f9e357e
commit 043ff61a0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View file

@ -12,7 +12,7 @@ use ruff_linter::package::PackageRoot;
use ruff_linter::{
linter::{FixerResult, LinterResult},
packaging::detect_package_root,
settings::{flags, types::UnsafeFixes, LinterSettings},
settings::{flags, LinterSettings},
};
use ruff_notebook::SourceValue;
use ruff_source_file::LineIndex;
@ -71,7 +71,7 @@ pub(crate) fn fix_all(
&query.virtual_file_path(),
package,
flags::Noqa::Enabled,
UnsafeFixes::Disabled,
query.settings().unsafe_fixes(),
linter_settings,
&source_kind,
source_type,