use of com.jetbrains.python.sdk.flavors.IronPythonSdkFlavor in project intellij-community by JetBrains.
the class GenerateBinaryStubsFix method isApplicable.
/**
* Checks if this fix can help you to generate binary stubs
*
* @param importStatementBase statement to fix
* @return true if this fix could work
*/
public static boolean isApplicable(@NotNull final PyImportStatementBase importStatementBase) {
if (importStatementBase.getFullyQualifiedObjectNames().isEmpty() && !(importStatementBase instanceof PyFromImportStatement && ((PyFromImportStatement) importStatementBase).isStarImport())) {
return false;
}
final Sdk sdk = getPythonSdk(importStatementBase);
if (sdk == null) {
return false;
}
final PythonSdkFlavor flavor = PythonSdkFlavor.getFlavor(sdk);
if (flavor instanceof IronPythonSdkFlavor) {
return true;
}
return isGtk(importStatementBase);
}
Aggregations