PY3.W0706
Try except raise
Used when an except handler uses raise as its first or only operator. This is useless because it raises back the exception immediately. Remove the raise operator or the entire try-except-raise block!
Noncompliant Code:
コピー
try:
1 / 0
except:
raise
Compliant Code:
コピー
try:
1 / 0
except ZeroDivisionError as e:
raise ValueError from e