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

25 lines
621 B
HTML

<html>
<body>
<p>Reports problems with the arguments of <code>property()</code> and functions
annotated with <code>@property</code>.</p>
<pre><code>
class C:
@property
def abc(self): # Getter should return or yield something
pass
@abc.setter
def foo(self, value): # Names of function and decorator don't match
pass
@abc.setter
def abc(self, v1, v2): # Setter signature should be (self, value)
pass
@abc.deleter
def abc(self, v1): # Delete signature should be (self)
pass
</code></pre>
<p>A quick-fix offers to update parameters.</p>
</body>
</html>