PY-1421 Include name of reference being imported in 'unused import' inspection report message

GitOrigin-RevId: 7d78a47c8496d3cfd669c4af67aa15357881f66d
This commit is contained in:
Mikhail Khorkov
2019-11-12 10:10:18 +00:00
committed by intellij-monorepo-bot
parent 6df055c558
commit c2987cd636
2 changed files with 2 additions and 1 deletions
@@ -364,6 +364,7 @@ INSP.unresolved.ref.$0=Unresolved reference ''{0}''
INSP.unresolved.ref.$0.for.class.$1=Unresolved attribute reference ''{0}'' for class ''{1}''
INSP.cannot.find.$0.in.$1=Cannot find reference ''{0}'' in ''{1}''
INSP.try.except.import.error=''{0}'' in try block with ''except ImportError'' should also be defined in except block
INSP.unused.import.statement=Unused import statement <code>#ref</code>
INSP.unresolved.operator.ref=Class ''{0}'' does not define ''{1}'', so the ''{2}'' operator cannot be used on its instances
# PyInterpreterInspection
@@ -1045,7 +1045,7 @@ public class PyUnresolvedReferencesInspection extends PyInspection {
continue;
}
if (element.getTextLength() > 0) {
registerProblem(element, "Unused import statement", ProblemHighlightType.LIKE_UNUSED_SYMBOL, null, new OptimizeImportsQuickFix());
registerProblem(element, PyBundle.message("INSP.unused.import.statement"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, null, new OptimizeImportsQuickFix());
}
}
}