mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[PY-83677] remove notification about enabling compatibility inspection
GitOrigin-RevId: 789b9b73bac6761cd3e267d3a186f336f1d1ff46
This commit is contained in:
committed by
intellij-monorepo-bot
parent
79121039b7
commit
d1c9862263
@@ -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>\\ \\ <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>\\ \\ <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());
|
||||
|
||||
Reference in New Issue
Block a user