diff --git a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java index d140d9e10761..67c631aa089a 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java +++ b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java @@ -114,7 +114,14 @@ public class PyCallExpressionHelper { } // decorators? PyFunction method = (PyFunction)resolved; // constructor call? - if (PyNames.INIT.equals(method.getName())) implicit_offset += 1; + if (PyNames.INIT.equals(method.getName())) { + String refName = us.getCallee() instanceof PyReferenceExpression + ? ((PyReferenceExpression) us.getCallee()).getReferencedName() + : null; + if (!PyNames.INIT.equals(refName)) { // PY-312 + implicit_offset += 1; + } + } // look for closest decorator PyDecoratorList decolist = method.getDecoratorList(); if (decolist != null) {