Skip to content

Commit 8c0a1be

Browse files
fmt
1 parent 338d8e7 commit 8c0a1be

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pyrefly/lib/commands/infer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use crate::commands::files::FilesArgs;
2424
use crate::commands::files::get_project_config_for_current_dir;
2525
use crate::commands::util::CommandExitStatus;
2626
use crate::config::error_kind::ErrorKind;
27-
use crate::state::ide::insert_import_edit_with_forced_import_format;
2827
use crate::state::ide::ImportEdit;
28+
use crate::state::ide::insert_import_edit_with_forced_import_format;
2929
use crate::state::lsp::AnnotationKind;
3030
use crate::state::lsp::ParameterAnnotation;
3131
use crate::state::require::Require;

pyrefly/lib/state/ide.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use pyrefly_python::symbol_kind::SymbolKind;
1414
use pyrefly_util::gas::Gas;
1515
use ruff_python_ast::Expr;
1616
use ruff_python_ast::ModModule;
17-
use ruff_python_ast::helpers::is_docstring_stmt;
18-
use ruff_python_ast::name::Name;
1917
use ruff_python_ast::Stmt;
2018
use ruff_python_ast::StmtImportFrom;
19+
use ruff_python_ast::helpers::is_docstring_stmt;
20+
use ruff_python_ast::name::Name;
2121
use ruff_text_size::Ranged;
2222
use ruff_text_size::TextRange;
2323
use ruff_text_size::TextSize;

pyrefly/lib/state/lsp.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,8 +1916,7 @@ impl<'a> Transaction<'a> {
19161916
import_format,
19171917
);
19181918
let range = TextRange::at(import_edit.position, TextSize::new(0));
1919-
let title =
1920-
format!("Insert import: `{}`", import_edit.display_text);
1919+
let title = format!("Insert import: `{}`", import_edit.display_text);
19211920
code_actions.push((
19221921
title,
19231922
module_info.dupe(),
@@ -2451,10 +2450,8 @@ impl<'a> Transaction<'a> {
24512450
import_format,
24522451
);
24532452
let import_text_edit = TextEdit {
2454-
range: module_info.to_lsp_range(TextRange::at(
2455-
import_edit.position,
2456-
TextSize::new(0),
2457-
)),
2453+
range: module_info
2454+
.to_lsp_range(TextRange::at(import_edit.position, TextSize::new(0))),
24582455
new_text: import_edit.insert_text.clone(),
24592456
};
24602457
(insert_text, Some(vec![import_text_edit]), module_name)

0 commit comments

Comments
 (0)