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

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>