boolean (@NotNull ConfiguratorContext context) { try { try (var stream = Files.walk(context.getProjectPath())) { boolean hasAnyPythonFiles = stream.anyMatch(f -> f.toString().endsWith(".py")); if (!hasAnyPythonFiles) { context.getLogger() .reportMessage(3, "Skipping Python interpreter configuration because the project doesn't contain any Python files"); } return hasAnyPythonFiles; } } catch (IOException e) { return false; } }