void (@NotNull PyCallExpression node) { super.visitPyCallExpression(node); PyExpression callee = node.getCallee(); if (callee != null && importedFromCompatibilityLibs(callee)) { return; } final TypeEvalContext context = TypeEvalContext.codeAnalysis(node.getProject(), node.getContainingFile()); final PsiElement resolvedCallee = Optional .ofNullable(callee) .map(PyExpression::getReference) .map(PsiReference::resolve) .map(e -> e instanceof PyClass ? ((PyClass)e).findInitOrNew(false, context) : e) .orElse(null); if (resolvedCallee instanceof PyFunction function) { final PyClass containingClass = function.getContainingClass(); final String functionName = PyUtil.isInitOrNewMethod(function) ? callee.getText() : function.getName(); if (containingClass != null) { final String className = containingClass.getName(); if (UnsupportedFeaturesUtil.CLASS_METHODS.containsKey(className)) { final Map<LanguageLevel, Set<String>> unsupportedMethods = UnsupportedFeaturesUtil.CLASS_METHODS.get(className); registerForAllMatchingVersions(level -> unsupportedMethods.getOrDefault(level, Collections.emptySet()).contains(functionName), PyPsiBundle.message("INSP.compatibility.feature.have.method", functionName), node); } } if (PyBuiltinCache.getInstance(function).isBuiltin(function) && !"print".equals(functionName) && !"exec".equals(functionName) && !myUsedImports.contains(functionName)) { registerForAllMatchingVersions(level -> UnsupportedFeaturesUtil.BUILTINS.get(level).contains(functionName), PyPsiBundle.message("INSP.compatibility.feature.have.method", functionName), node); } } else if (resolvedCallee instanceof PyTargetExpression target) { if (!target.isQualified() && PyNames.TYPE_LONG.equals(target.getName()) && PyBuiltinCache.getInstance(resolvedCallee).isBuiltin(resolvedCallee)) { registerForAllMatchingVersions(level -> UnsupportedFeaturesUtil.BUILTINS.get(level).contains(PyNames.TYPE_LONG), PyPsiBundle.message("INSP.compatibility.feature.have.type.long"), node); } } }