mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
24 lines
596 B
HTML
24 lines
596 B
HTML
<html>
|
|
<body>
|
|
<p>Reports problems with nesting decorators. The inspection highlights the cases when <code>classmethod</code> or <code>staticmethod</code>
|
|
is applied before another decorator.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
def innocent(f):
|
|
return f
|
|
|
|
|
|
class A:
|
|
@innocent # Decorator will not receive a callable it may expect
|
|
@classmethod
|
|
def f2(cls):
|
|
pass
|
|
|
|
@innocent # Decorator will not receive a callable it may expect
|
|
@staticmethod
|
|
def f1():
|
|
pass
|
|
</code></pre>
|
|
<p>As a quick-fix, the IDE offers to remove the decorator.</p>
|
|
</body>
|
|
</html> |