UP035: Consistently set the deprecated tag (#21396)

This commit is contained in:
Bhuminjay Soni 2025-11-12 12:47:29 +05:30 committed by GitHub
parent 988c38c013
commit d2c3996f4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}