[PY-83677] remove notification about enabling compatibility inspection

GitOrigin-RevId: 789b9b73bac6761cd3e267d3a186f336f1d1ff46
This commit is contained in:
Vladimir.Koshelev
2025-08-26 16:21:36 +00:00
committed by intellij-monorepo-bot
parent 79121039b7
commit d1c9862263
2 changed files with 0 additions and 27 deletions
@@ -1256,16 +1256,6 @@ python.compatibility.inspection.advertiser.notifications.title=Python versions c
INSP.poetry.package.versions.display.name=Outdated Poetry package versions
INSP.uv.package.versions.display.name=Outdated uv package versions
python.compatibility.inspection.advertiser.using.future.imports.warning.message=\
Your source code contains __future__ imports.<br/>\
Would you like to enable Code compatibility inspection?<br/>\
<a href="#yes">Yes</a>\\&nbsp;\\&nbsp;<a href="#no">No</a>
python.compatibility.inspection.advertiser.using.six.warning.message=\
Your source code imports the 'six' package.<br/>\
Would you like to enable Code compatibility inspection?<br/>\
<a href="#yes">Yes</a>\\&nbsp;\\&nbsp;<a href="#no">No</a>
# Both placeholders are Python versions like 2.7, 3.7, etc.
python.compatibility.inspection.advertiser.version.stale.python3.version.warning.message=\
Code compatibility inspection is configured for Python versions up to {0}.<br/>\
@@ -79,14 +79,6 @@ public final class PyCompatibilityInspectionAdvertiser implements Annotator {
showStalePython3VersionWarning(pyFile, project, pyVersion);
}
}
else if (containsFutureImports(pyFile)) {
showSingletonNotification(
project, PyBundle.message("python.compatibility.inspection.advertiser.using.future.imports.warning.message"), USING_FUTURE_IMPORTS);
}
else if (PyPsiUtils.containsImport(pyFile, "six")) {
showSingletonNotification(
project, PyBundle.message("python.compatibility.inspection.advertiser.using.six.warning.message"), USING_SIX_PACKAGE);
}
}
}
}
@@ -194,15 +186,6 @@ public final class PyCompatibilityInspectionAdvertiser implements Annotator {
.notify(project);
}
private static boolean containsFutureImports(@NotNull PyFile file) {
for (PyFromImportStatement importStatement : file.getFromImports()) {
if (importStatement.isFromFuture()) {
return true;
}
}
return false;
}
private static boolean isCompatibilityInspectionEnabled(@NotNull PsiElement anchor) {
final InspectionProfile profile = InspectionProfileManager.getInstance(anchor.getProject()).getCurrentProfile();
final InspectionToolWrapper tool = profile.getInspectionTool(getCompatibilityInspectionShortName(), anchor.getProject());