diff --git a/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs b/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs index ead0f5b5004e10..44ab2d2691c855 100644 --- a/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs +++ b/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs @@ -221,7 +221,6 @@ pub(crate) fn is_singledispatch_implementation( pub(crate) fn quote_annotation( node_id: NodeId, semantic: &SemanticModel, - locator: &Locator, stylist: &Stylist, generator: Generator, ) -> Result { @@ -233,7 +232,7 @@ pub(crate) fn quote_annotation( // If we're quoting the value of a subscript, we need to quote the entire // expression. For example, when quoting `DataFrame` in `DataFrame[int]`, we // should generate `"DataFrame[int]"`. - return quote_annotation(parent_id, semantic, locator, stylist, generator); + return quote_annotation(parent_id, semantic, stylist, generator); } } Some(Expr::Attribute(parent)) => { @@ -241,7 +240,7 @@ pub(crate) fn quote_annotation( // If we're quoting the value of an attribute, we need to quote the entire // expression. For example, when quoting `DataFrame` in `pd.DataFrame`, we // should generate `"pd.DataFrame"`. - return quote_annotation(parent_id, semantic, locator, stylist, generator); + return quote_annotation(parent_id, semantic, stylist, generator); } } Some(Expr::Call(parent)) => { @@ -249,7 +248,7 @@ pub(crate) fn quote_annotation( // If we're quoting the function of a call, we need to quote the entire // expression. For example, when quoting `DataFrame` in `DataFrame()`, we // should generate `"DataFrame()"`. - return quote_annotation(parent_id, semantic, locator, stylist, generator); + return quote_annotation(parent_id, semantic, stylist, generator); } } Some(Expr::BinOp(parent)) => { @@ -257,7 +256,7 @@ pub(crate) fn quote_annotation( // If we're quoting the left or right side of a binary operation, we need to // quote the entire expression. For example, when quoting `DataFrame` in // `DataFrame | Series`, we should generate `"DataFrame | Series"`. - return quote_annotation(parent_id, semantic, locator, stylist, generator); + return quote_annotation(parent_id, semantic, stylist, generator); } } _ => {} diff --git a/crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs b/crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs index d9d7b45e2e5c63..561f95db2de6aa 100644 --- a/crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs +++ b/crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs @@ -270,7 +270,6 @@ fn quote_imports(checker: &Checker, node_id: NodeId, imports: &[ImportBinding]) Some(quote_annotation( reference.expression_id()?, checker.semantic(), - checker.locator(), checker.stylist(), checker.generator(), )) diff --git a/crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs b/crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs index 3470430384f572..d0869d3c05f0a6 100644 --- a/crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs +++ b/crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs @@ -505,7 +505,6 @@ fn fix_imports(checker: &Checker, node_id: NodeId, imports: &[ImportBinding]) -> Some(quote_annotation( reference.expression_id()?, checker.semantic(), - checker.locator(), checker.stylist(), checker.generator(), ))