boolean () { if (isPositionalContainer() || isKeywordContainer()) { return false; } PyFunction function = getStubOrPsiParentOfType(PyFunction.class); if (function == null) { return false; } final PyClass cls = function.getContainingClass(); final PyParameter[] parameters = function.getParameterList().getParameters(); if (cls != null && parameters.length > 0 && parameters[0] == this) { if (PyUtil.isNewMethod(function)) { return true; } final PyFunction.Modifier modifier = function.getModifier(); if (modifier != PyFunction.Modifier.STATICMETHOD) { return true; } } return false; }