mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-20 04:29:47 +00:00
UP035: Consistently set the deprecated tag (#21396)
This commit is contained in:
parent
988c38c013
commit
d2c3996f4e
1 changed files with 2 additions and 1 deletions
|
|
@ -766,11 +766,12 @@ pub(crate) fn deprecated_import(checker: &Checker, import_from_stmt: &StmtImport
|
||||||
}
|
}
|
||||||
|
|
||||||
for operation in fixer.with_renames() {
|
for operation in fixer.with_renames() {
|
||||||
checker.report_diagnostic(
|
let mut diagnostic = checker.report_diagnostic(
|
||||||
DeprecatedImport {
|
DeprecatedImport {
|
||||||
deprecation: Deprecation::WithRename(operation),
|
deprecation: Deprecation::WithRename(operation),
|
||||||
},
|
},
|
||||||
import_from_stmt.range(),
|
import_from_stmt.range(),
|
||||||
);
|
);
|
||||||
|
diagnostic.add_primary_tag(ruff_db::diagnostic::DiagnosticTag::Deprecated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue