Avoid loading files for cached format results (#8134)

This commit is contained in:
Micha Reiser 2023-10-23 20:29:13 +09:00 committed by GitHub
parent 08519e22e4
commit 6199590072
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 25 deletions

View file

@ -571,7 +571,6 @@ mod tests {
use ruff_cache::CACHE_DIR_NAME;
use ruff_linter::settings::flags;
use ruff_linter::settings::types::UnsafeFixes;
use ruff_linter::source_kind::SourceKind;
use ruff_python_ast::PySourceType;
use ruff_workspace::Settings;
@ -1061,7 +1060,6 @@ mod tests {
format_path(
&file_path,
&self.settings.formatter,
&SourceKind::Python(std::fs::read_to_string(&file_path).unwrap()),
PySourceType::Python,
FormatMode::Write,
Some(cache),