mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
25 lines
458 B
HTML
25 lines
458 B
HTML
<html>
|
|
<body>
|
|
<p>Reports cases when a custom exception class is
|
|
raised but does not inherit from the
|
|
<a href="https://docs.python.org/3/library/exceptions.html">builtin Exception class</a>.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class A:
|
|
pass
|
|
|
|
|
|
def me_exception():
|
|
raise A()
|
|
</code></pre>
|
|
<p>The proposed quick-fix changes the code to:</p>
|
|
<pre><code>
|
|
class A(Exception):
|
|
pass
|
|
|
|
|
|
def me_exception():
|
|
raise A()
|
|
</code></pre>
|
|
</body>
|
|
</html> |