mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
added Add Exception base class quick fix to the Exception doesn't inherit from standard ''Exception'' class inspection
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
|
||||
class MyException:
|
||||
def __new__(cls, x):
|
||||
pass
|
||||
|
||||
|
||||
def foo():
|
||||
raise <warning descr="Exception doesn't inherit from base 'Exception' class">My<caret>Exception()</warning>
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
class MyException(Exception):
|
||||
def __new__(cls, x):
|
||||
pass
|
||||
|
||||
|
||||
def foo():
|
||||
raise MyException()
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
class A:
|
||||
pass
|
||||
|
||||
class MyException(A):
|
||||
def __new__(cls, x):
|
||||
pass
|
||||
|
||||
|
||||
def foo():
|
||||
raise <warning descr="Exception doesn't inherit from base 'Exception' class">MyExcep<caret>tion()</warning>
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
|
||||
class A:
|
||||
pass
|
||||
|
||||
class MyException(A, Exception):
|
||||
def __new__(cls, x):
|
||||
pass
|
||||
|
||||
|
||||
def foo():
|
||||
raise MyException()
|
||||
|
||||
Reference in New Issue
Block a user