mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
31 lines
648 B
HTML
31 lines
648 B
HTML
<html>
|
|
<body>
|
|
<p>Reports methods that lack the first parameter that is usually
|
|
named <code>self</code>.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Movie:
|
|
|
|
def show():
|
|
pass
|
|
</code></pre>
|
|
<p>When the quick-fix is applied, the code changes to:</p>
|
|
<pre><code>
|
|
class Movie:
|
|
|
|
def show(self):
|
|
pass
|
|
</code></pre>
|
|
<p>The inspection also reports naming issues in class methods.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Movie:
|
|
@classmethod
|
|
def show(abc):
|
|
pass
|
|
</code></pre>
|
|
<p>Since the first parameter of a class method should be <code>cls</code>, the IDE provides a quick-fix
|
|
to rename it.</p>
|
|
</body>
|
|
</html>
|