Search in sources :

Example 1 with PythonModuleTypeBase

use of com.jetbrains.python.PythonModuleTypeBase in project intellij-community by JetBrains.

the class PythonLanguageLevelPusher method isPythonModule.

private static boolean isPythonModule(@NotNull final Module module) {
    final ModuleType moduleType = ModuleType.get(module);
    if (moduleType instanceof PythonModuleTypeBase)
        return true;
    final Facet[] allFacets = FacetManager.getInstance(module).getAllFacets();
    for (Facet facet : allFacets) {
        if (facet.getConfiguration() instanceof PythonFacetSettings) {
            return true;
        }
    }
    return false;
}
Also used : ModuleType(com.intellij.openapi.module.ModuleType) PythonFacetSettings(com.jetbrains.python.facet.PythonFacetSettings) PythonModuleTypeBase(com.jetbrains.python.PythonModuleTypeBase) Facet(com.intellij.facet.Facet)

Aggregations

Facet (com.intellij.facet.Facet)1 ModuleType (com.intellij.openapi.module.ModuleType)1 PythonModuleTypeBase (com.jetbrains.python.PythonModuleTypeBase)1 PythonFacetSettings (com.jetbrains.python.facet.PythonFacetSettings)1