added Add Exception base class quick fix to the Exception doesn't inherit from standard ''Exception'' class inspection

This commit is contained in:
Ekaterina Tuzova
2014-03-12 12:49:04 +04:00
parent 90c4e074db
commit ee5f16edd6
8 changed files with 155 additions and 2 deletions
@@ -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>
@@ -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>
@@ -0,0 +1,12 @@
class A:
pass
class MyException(A, Exception):
def __new__(cls, x):
pass
def foo():
raise MyException()