Files
openide/python/python-psi-impl/resources/inspectionDescriptions/PyInitNewSignatureInspection.html
Louis Vignierandintellij-monorepo-bot 1869ec9da6 [codeInspection] Fix python inspection descriptions
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
2023-04-28 13:13:25 +00:00

18 lines
524 B
HTML

<html>
<body>
<p>Reports incompatible signatures of the <code>__new__</code> and <code>__init__</code> methods.</p>
<p><b>Example:</b></p>
<pre><code>
class MyClass(object):
def __new__(cls, arg1):
return super().__new__(cls)
def __init__(self):
pass
</code></pre>
<p>If the <code>__new__</code> and <code>__init__</code> have different arguments, then the <code>MyClass</code>
cannot be instantiated.</p>
<p>As a fix, the IDE offers to apply the Change Signature refactoring.</p>
</body>
</html>