From d2c3996f4e2bd4bce5280b6da479d5f176702651 Mon Sep 17 00:00:00 2001 From: Bhuminjay Soni Date: Wed, 12 Nov 2025 12:47:29 +0530 Subject: [PATCH] `UP035`: Consistently set the deprecated tag (#21396) --- .../ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs b/crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs index 9b15ac0b5b..51c3147a50 100644 --- a/crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs +++ b/crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs @@ -766,11 +766,12 @@ pub(crate) fn deprecated_import(checker: &Checker, import_from_stmt: &StmtImport } for operation in fixer.with_renames() { - checker.report_diagnostic( + let mut diagnostic = checker.report_diagnostic( DeprecatedImport { deprecation: Deprecation::WithRename(operation), }, import_from_stmt.range(), ); + diagnostic.add_primary_tag(ruff_db::diagnostic::DiagnosticTag::Deprecated); } }