diff --git a/python/python-psi-impl/resources/messages/PyPsiBundle.properties b/python/python-psi-impl/resources/messages/PyPsiBundle.properties
index abce1ac2880c..b101772964a5 100644
--- a/python/python-psi-impl/resources/messages/PyPsiBundle.properties
+++ b/python/python-psi-impl/resources/messages/PyPsiBundle.properties
@@ -586,10 +586,6 @@ INSP.decorator.receives.unexpected.builtin=This decorator will not receive a cal
INSP.NAME.redeclaration=Redeclared names without usages
INSP.redeclared.name=Redeclared ''{0}'' defined above without usage
-# PyUnresolvedReferencesInspection
-INSP.try.except.import.error=''{0}'' in the try block with ''except ImportError'' should also be defined in the except block
-INSP.unused.import.statement=Unused import statement #ref
-
# PyInterpreterInspection
INSP.NAME.invalid.interpreter=An invalid interpreter
INSP.interpreter.pipenv.interpreter.associated.with.another.project=Pipenv interpreter is associated with another project: ''{0}''
@@ -927,8 +923,10 @@ INSP.unresolved.refs.ignore.references.label=Ignored references:
unresolved.docstring.param.reference=Function ''{0}'' does not have a parameter ''{1}''
unresolved.import.reference=No module named ''{0}''
-# PyUnusedImportInspection
+# PyUnusedImportsInspection
INSP.NAME.unused.imports=Unused imports
+INSP.unused.imports.try.except.import.error=''{0}'' in the try block with ''except ImportError'' should also be defined in the except block
+INSP.unused.imports.unused.import.statement=Unused import statement #ref
# PyRedundantParenthesesInspection
INSP.NAME.redundant.parentheses=Redundant parentheses
diff --git a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyUnusedImportsInspection.kt b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyUnusedImportsInspection.kt
index 3272614f6aab..1058d61ab6e0 100644
--- a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyUnusedImportsInspection.kt
+++ b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyUnusedImportsInspection.kt
@@ -251,7 +251,7 @@ class PyUnusedImportsInspection : PyInspection() {
}
if (element.getTextLength() > 0) {
val fix = OptimizeImportsQuickFix()
- registerProblem(element, PyPsiBundle.message("INSP.unused.import.statement"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, null, fix)
+ registerProblem(element, PyPsiBundle.message("INSP.unused.imports.unused.import.statement"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, null, fix)
}
}
}
@@ -264,7 +264,7 @@ class PyUnusedImportsInspection : PyInspection() {
val asElement = definer.asNameElement
val toHighlight: PyElement? = asElement ?: definer.importReferenceExpression
registerProblem(toHighlight,
- PyPsiBundle.message("INSP.try.except.import.error", definer.getVisibleName()),
+ PyPsiBundle.message("INSP.unused.imports.try.except.import.error", definer.getVisibleName()),
ProblemHighlightType.LIKE_UNKNOWN_SYMBOL)
}
}