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

29 lines
638 B
HTML

<html>
<body>
<p>Reports discrepancies between declared parameters and actual arguments, as well as
incorrect arguments, for example, duplicate named arguments, and incorrect argument order.</p>
<p><b>Example:</b></p>
<pre><code>
class Foo:
def __call__(self, p1: int, *, p2: str = "%"):
return p2 * p1
bar = Foo()
bar.__call__() # unfilled parameter
bar(5, "#") # unexpected argument
</code></pre>
<p>The correct code fragment looks at follows:</p>
<pre><code>
class Foo:
def __call__(self, p1: int, *, p2: str = "%"):
return p2 * p1
bar = Foo()
bar.__call__(5)
bar(5, p2="#")
</code></pre>
</body>
</html>